| Crates.io | prng_split |
| lib.rs | prng_split |
| version | 0.1.0 |
| created_at | 2024-11-21 22:50:34.009309+00 |
| updated_at | 2024-11-21 22:50:34.009309+00 |
| description | A subset of the split commmand with a prng seeded from input for deterministic output |
| homepage | |
| repository | https://github.com/waynevanson/prng_split |
| max_upload_size | |
| id | 1456781 |
| size | 32,647 |
range-splitA subset of the UNIX split command built with a PRNG for creating files of differening and deterministic sizes, seeded from the input.
There's a bit of fluffling around but this can be used to host large files in GitHub without them knowing.
# archive, compress, split
INPUT_DIR="path/to/big/directory"
PREFIX=".parts/"
RANGE="(0KB,50MB)" # 50MB is GitHub recommended max size.
tar cf - "$INPUT_DIR" | xz -9 -c | range-split -vvvv --factor 16 --prefix "$PREFIX" "$RANGE"
# concatenate, uncompress, unarchive
cat "$@" | xz -d -c | tar xf -
This library is available as a flake.
{
inputs = {
range-split.url = "github:waynevanson/elevated-cycling";
};
outputs = {}: {
};
}