Portable Network Archive (PNA) is a flexible, secure, and cross-platform archive format inspired by the PNG data structure. It combines the simplicity of ZIP with the robustness of TAR, providing efficient compression, strong encryption, and seamless splitting and streaming capabilities.
Portable Network Archive (PNA): A Flexible, Secure, and Cross-Platform Archive Format
- Portability: Works seamlessly across multiple platforms, combining the strengths of TAR and ZIP formats.
- Compression Flexibility: Advanced per-file and archive-wide compression options reduce the need for full archive decompression.
- Encryption & Security: Supports 256-bit AES and Camellia for robust protection of sensitive data.
- Splittable Structure: Based on PNG’s data unit structure, enabling the easy division of large archives into smaller parts.
- Streamability: Supports serial read and write operations, making it suitable for streaming processing, similar to a TAR format.
- Extensibility: Designed to accommodate future extensions and private add-ons, ensuring compatibility with the basic PNA format while allowing for flexible customization.
- Error Resilience: File integrity checks and error detection ensure data is secure during transmission.
Additionally, the PNA specification includes a rationale appendix to help developers understand key design choices, making implementation more straightforward.
Many archive formats require a non-trivial amount of metadata (timestamps, permissions, owner ids, directory tables, checksums, etc.) to be present even when you do not want to preserve them.
PNA is intentionally designed so that everything other than the entry name and the entry body can be optional. In other words, it is possible (by design, without violating the specification) to build an archive that contains only:
- the file name (entry identifier), and
- the file body (payload bytes)
and omit all other information.
This enables a few practical advantages:
- Smallest possible archives: no overhead from timestamps, permissions, comments, or other ancillary fields when they are unnecessary.
- Privacy / information minimization: avoids unintentionally leaking environment details such as mtime, uid/gid, filesystem attributes, tool versions, etc.
- Deterministic / reproducible packaging: fewer variable fields means it is easier to produce stable byte-for-byte outputs across environments.
- Clean transport container: when used as a network-friendly container, the archive can carry exactly what the sender intends—no more, no less.
-
File Compression and Decompression
- Supports zlib, zstd, and xz.
-
File Encryption and Decryption
- Supports 256-bit AES and 256-bit Camellia.
-
Solid Mode
- Compresses and encrypts the entire archive as a single block.
-
File Attribute Preservation (Maintains and restores)
- File permissions.
- File timestamps.
- Extended attributes.
- Access Control Lists (ACLs) (experimental).
- Cross-platform support including Windows, Linux, macOS, and FreeBSD
(Support for additional platforms planned.)
curl --proto '=https' --tlsv1.2 -LsSf 'https://github.com/ChanTsune/Portable-Network-Archive/releases/latest/download/portable-network-archive-installer.sh' | shpowershell -ExecutionPolicy Bypass -c "irm https://github.com/ChanTsune/Portable-Network-Archive/releases/latest/download/portable-network-archive-installer.ps1 | iex"cargo install portable-network-archivecargo install --git https://github.com/ChanTsune/Portable-Network-Archive.git portable-network-archivepna create -f archive.pna file1.txt file2.txt
pna extract -f archive.pna
pna list -f archive.pnaIf you prefer tar-like syntax, a bsdtar-compatible interface is available:
pna compat bsdtar -cf archive.pna file1.txt file2.txt
pna compat bsdtar -xf archive.pna
pna compat bsdtar -tf archive.pnaBoth styles produce PNA-format archives. Note that compat bsdtar preserves permissions, ownership, and timestamps by default (matching bsdtar behavior), while PNA-native commands require explicit flags to preserve them.
For more commands and options:
pna --helpSee also the CLI Reference for detailed command documentation.
Detailed information is available in the Specification document.
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.