Packmatic v0.1.0 API Reference

Modules

Top-level module holding the Packmatic library, which provides ZIP-oriented stream aggregation services from various sources.

Contains convenience functions which can be used to easily integrate a Zip stream with Plug-using applications such as Phoenix.

Holds logic which can be used to put together a ZIP file in an interative fashion, suitable for wrapping within a Stream. The format of ZIP files emitted by Packmatic.Encoder is documented under the modules implementing the Packmatic.Field protocol.

Represents the End of Central Directory record.

Represents the Central Directory File Header, which is part of the Central Directory that is emitted after all successfully encoded files have been incorporated into the ZIP stream.

Represents the Data Descriptor, which is used to facilitate streaming. This is requried since Packmatic assembles the files on the fly, so it does not know the size until the entire source has been read.

Represents the Local File Header, which is emitted before the content of each file is incorporated into the ZIP stream.

Represents the Zip64 Extended Information Extra Field, which can be emitted in both Local and Central File Headers, but in practice only used in the Central File Header within Packmatic, due to its streaming nature.

Represents the Extended Timestamp Extra Field, which is emitted in both Local and Central File Headers. The field is emitted with only the modification time, in seconds since UNIX epoch (1 January, 1970).

The Shared Timestamp field is emitted in both Local and Central File Headers, and is emitted in DOS (FAT) format.

Represents the customer’s request for a particular compressed file, which is composed of various Source Entries.

Represents a particular file that will go into package, which is sourced by reading from a file, downloading from an URI, etc.

Defines how data can be acquired in a piecemeal fashion, perhaps by reading only a few pages from the disk at a time or only a few MBs of data from an open socket.

Represents content which may be generated on-demand, for example by another subsystem or via downloading from a signed URL. The Dynamic source has no read function, and must initialise into a File or URL Source.

Represents content on disk, for example from a static file. Also useful for content generated ahead of time.

Represents randomly generated content, which is used mostly for testing, when you want to have a particular entry generated to a specific length.

Represents content which can be acquired by downloading from a remote server via HTTP(S) in chunks. Each chunk is then pulled away by the Encoder, which is iterated by the Stream.

Exceptions