Closed phrohdoh closed 6 years ago
Currently we only support 'packing' a directory recursively.
Ideally a user of the library would be able to pack any (name, data) items into an archive.
(name, data)
Possible function signatures (not the only options though!):
pub fn pack(items: Vec<(String, &[u8])>, settings: Settings) -> Result<Archive>; pub fn pack(items: Vec<(String, &[u8])>, settings: Settings) -> Result<Vec<u8>>; pub fn pack(buf: &mut [u8], items: Vec<(String, &[u8])>, settings: Settings) -> Result<usize>;
At this point library users could pack from a (collected) TCP stream if they felt so inclined.
Note: This will make unit testing the contents of an Archive simple (ref https://github.com/Phrohdoh/easage/issues/38).
Currently we only support 'packing' a directory recursively.
Ideally a user of the library would be able to pack any
(name, data)
items into an archive.Possible function signatures (not the only options though!):
At this point library users could pack from a (collected) TCP stream if they felt so inclined.
Note: This will make unit testing the contents of an Archive simple (ref https://github.com/Phrohdoh/easage/issues/38).