Expand description
A library for reading and writing PNA archives
This library provides utilities necessary to manage PNA archives abstracted over a reader or writer. Great strides are taken to ensure that an archive is never required to be fully resident in memory, and all objects provide largely a streaming interface to read bytes from.
Modules§
- prelude
- PNA Prelude.
Structs§
- Archive
- An object providing access to a PNA file. An instance of an Archive can be read and/or written.
- Chunk
Type - A 4-byte chunk type code.
- Compression
Level - Compression level of each algorithm.
- Entry
Builder - A builder for creating a new NormalEntry.
- Entry
Data Reader - Reader for Entry data.
- Entry
Header - Represents the entry information header that expressed in the FHED chunk.
- Entry
Name - A UTF-8 encoded entry name.
- Entry
Name Error - Error of invalid EntryName.
- Entry
Part - A structure representing the split Entry for archive splitting.
- Entry
Reference - A UTF-8 encoded entry reference.
- Entry
Reference Error - Error of invalid EntryReference.
- Extended
Attribute - Entry extended attribute.
- Hash
Algorithm - Password hash algorithm.
- Metadata
- Metadata information about an entry.
- Normal
Entry - A normal entry in a PNA archive.
- Permission
- Permission struct represents an owner, group, and permissions for an entry.
- RawChunk
- A raw chunk in a PNA archive.
- Read
Options - Options for reading an entry.
- Read
Options Builder - Builder for
ReadOptions
. - Solid
Archive - An object that provides write access to solid mode PNA files.
- Solid
Entry - A solid mode entry in a PNA archive.
- Solid
Entry Builder - A builder for creating a new solid Entry.
- Solid
Header - Represents the entry information header that expressed in the SHED chunk.
- Write
Options - Options for writing an entry.
- Write
Options Builder - Builder for
WriteOptions
.
Enums§
- Chunk
Type Error - ChunkType validation error.
- Cipher
Algorithm - Cipher algorithm.
- Cipher
Mode - Cipher mode of encryption algorithm.
- Compression
- Compression method.
- Data
Kind - Type of entry.
- Encryption
- Encryption algorithm.
- Read
Entry - A NormalEntry or SolidEntry read from an archive.
Constants§
- MIN_
CHUNK_ BYTES_ SIZE - Minimum required size in bytes to represent
Chunk
. length: 4 bytes + chunk type: 4 bytes + data: 0 bytes + crc: 4 bytes - PNA_
HEADER - The magic number of Portable-Network-Archive
Traits§
- Chunk
- A trait representing a chunk in a PNA archive.
- Entry
- A trait representing an entry in a PNA archive.
Functions§
- read_
as_ chunks - Read archive as chunks from given reader.
- read_
chunks_ from_ slice - Read archive as chunks from given bytes.