|0.1.0||Jan 23, 2021|
#7 in #bundle
Unified Bundler is a library to assist programs in bundling multiple sources into one. Is a fast, very generic, and flexible library.
[dependencies] ub = "0.1.0"
examples/ directory for a simple CLI tool.
This crate is licensed under the MIT license, and all contributions must also be.
This is a lib and binary crate to bundle files to a single one, like zipping it without compression. Can bundle folders, and open bundles.
Current structure of file:
version(u32), big endian u32 signaling the number of the bundle.
- Here the
headerbegins. Everything after this, up to where the file data start is part of the
- Header size,
header_size(u64): size of header including these 8 bytes (it starts directly after the version)
- Size of path length
path_length_bytes(u8): byte to indicate length of length of paths (a big endian value of 1 indicates a path's length will take 1 byte)
- List of file meta entries
files(no defined length, that is what the header size is for)
- File size,
file_size(u64): the file size. Used to calculate where the files are located in the file. (weak point for corruption, so maybe add a
- Path length,
path_length_bytes * 8); [
deserialize::UintParseType]): how many bytes after of this will provide the path.
- Path data,
path_length]): the path for this file, used in extraction. I have plans to cluster these when files start with the same bytes to avoid repetition (have a group for a folder with many files, so the individual files don't need the whole path.)
- File size,