packkit/cpio
CPIO “newc” (SVR4) archive encoder and decoder.
The newc format uses fixed 110-byte ASCII hex headers and pads names and bodies to a 4-byte alignment. This module implements regular files, directories, and symbolic links. Hard links are rejected because newc represents them through shared inode numbers rather than a distinct typeflag.
Values
pub fn decode(
bytes bytes: BitArray,
) -> Result(archive.Archive, error.ArchiveError)
Decode a newc byte stream using default limits.
pub fn decode_with_limits(
bytes bytes: BitArray,
limits limits: limit.Limits,
) -> Result(archive.Archive, error.ArchiveError)
Decode a newc byte stream using explicit limits.
pub fn encode(
archive archive_value: archive.Archive,
) -> Result(BitArray, error.ArchiveError)
Encode the logical archive to a newc byte stream.