https://github.com/chantsune/portable-network-archive
PNA (Portable Network Archive) is a highly scalable archive format that can be compressed, encrypted, and split. Also, its data structure is inspired by the PNG data structure.
https://github.com/chantsune/portable-network-archive
archive archive-format compression data-structures file-format rust rust-lang zstd
Last synced: 5 months ago
JSON representation
PNA (Portable Network Archive) is a highly scalable archive format that can be compressed, encrypted, and split. Also, its data structure is inspired by the PNG data structure.
- Host: GitHub
- URL: https://github.com/chantsune/portable-network-archive
- Owner: ChanTsune
- License: apache-2.0
- Created: 2020-02-10T13:56:54.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2025-04-13T04:10:53.000Z (7 months ago)
- Last Synced: 2025-04-13T04:52:21.637Z (7 months ago)
- Topics: archive, archive-format, compression, data-structures, file-format, rust, rust-lang, zstd
- Language: Rust
- Homepage:
- Size: 3.5 MB
- Stars: 11
- Watchers: 4
- Forks: 1
- Open Issues: 29
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# Portable Network Archive (PNA)
[](https://crates.io/crates/portable-network-archive)
[](https://crates.io/crates/portable-network-archive)
[](https://docs.rs/portable-network-archive)
[](https://github.com/ChanTsune/Portable-Network-Archive/actions/workflows/test.yml)

**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.
### Why PNA?
**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.
## Features
- **File Compression and Decompression**
- [x] Supports zlib, zstd, and xz.
- **File Encryption and Decryption**
- [x] Supports 256-bit AES and 256-bit Camellia.
- **Solid Mode**
- [x] Compresses and encrypts the entire archive as a single block.
- **File Attribute Preservation (Maintains and restores)**
- [x] File permissions.
- [x] File timestamps.
- [x] Extended attributes.
- [x] Access Control Lists (ACLs) (experimental).
## CLI Supported Platform
- Cross-platform support including Windows, Linux, macOS, and FreeBSD
_(Support for additional platforms planned.)_
## Installation
### Via Cargo
```sh
cargo install portable-network-archive
```
### From Source (via Cargo)
```sh
cargo install --git https://github.com/ChanTsune/Portable-Network-Archive.git portable-network-archive
```
## Basic Usage
Create an archive:
```sh
pna create [FILES]...
```
Extract an archive:
```sh
pna extract
```
List archive contents:
```sh
pna list
```
For more commands and options:
```sh
pna --help
```
## Specification
Detailed information is available in the [Specification](https://portable-network-archive.github.io/Portable-Network-Archive-Specification/) document.
# License
This project is licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](./LICENSE-APACHE) or
http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](./LICENSE-MIT) or
http://opensource.org/licenses/MIT)
at your option.
### Contribution
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.