API Reference Packmatic v1.2.0

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 Events that can be raised during the lifecycle of a Packmatic Stream being consumed.

Represents an Event that is raised when the Encoder has completed reading from the Entry, i.e. when the Source has returned EOF.

Represents an Event that is raised when the Encoder has failed to read from the Entry, i.e. when the Source has returned an error. Depending on the options, the Stream may continue to encode or it may halt.

Represents an Event that is raised when the Encoder starts reading from a new Entry. The Entry is the same one as passed in the Manifest.

Represents an Event that is raised when the Encoder has made progress reading from the Entry. Usually, the Source will read iteratively so this messge can be raised quite frequently.

Represents an Event that is raised when the Encoder completes work. In case of normal completion, the reason will be set to :done, otherwise and in case of Source errors, the reason will be carried across.

Represents an Event that is raised when a new copy of Encoder, and therefore a new Stream, is started against the Manifest.

Represents data fields used internally by Packmatic.Encoder to represent information which make up the Zip format.

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.

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.

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 generated by enumerating a Stream, which returns IO Lists.

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.