Download the PHP package kduma/pcf without Composer

On this page you can find all versions of the php package kduma/pcf. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pcf

pcf — Partitioned Container Format (PHP implementation)

PHP reader/writer for PCF v1.0, a language-agnostic binary container that stores multiple independent byte regions ("partitions") in one file.

This is the first PHP port of the format. It mirrors the written specification (specs/PCF-spec-v1.0.txt) and the Rust reference (reference/PCF-v1.0/) field-for-field, and it reproduces the canonical 395-byte test vector from spec section 15 byte-for-byte. It favours auditability over performance.

Layout

All integers are little-endian. Free space is max_length - used_bytes.

Hash registry

id algorithm id algorithm
0 none 5 SHA-1
1 CRC-32/ISO-HDLC 16 SHA-256 (default)
2 CRC-32C 17 SHA-512
3 CRC-64/XZ 18 BLAKE3
4 MD5

Most algorithms come from PHP's bundled ext-hash. The two it does not provide:

Requirements

Installation

Usage

Container works over any Kduma\PCF\Storage\StorageInterface:

Operations

Method Purpose
Container::create() / createWith() Start an empty container.
Container::open() Open an existing one (validates magic + major version).
addPartition() Append a partition (unique non-NIL UID, non-reserved type).
updatePartitionData() Replace data in place; maintains the hash cascade.
removePartition() Remove a partition (data region becomes dead space).
entries() / readPartitionData() Read metadata and data.
verify() Verify every table-block and partition hash + conformance checks.
compactedImage() / compactInto() Produce the tightly packed canonical form.

Errors are reported as Kduma\PCF\PcfException; the precise cause is available as $e->kind (a Kduma\PCF\ErrorKind).

Tests

The suite mirrors the Rust reference:


All versions of pcf with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-hash Version *
tourze/blake3-php Version ^0.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kduma/pcf contains the following files

Loading the files please wait ...