1
0
Fork 1
mirror of https://github.com/vbatts/tar-split.git synced 2025-10-04 13:11:01 +00:00
tar-split/cmd/tar-split
Vincent Batts c8b16f6803
*.go: move the carrierd archive/tar to internal/
The feature of golang having source in a project path with "internal"
makes the code only able to be imported by the project itself.
https://docs.google.com/document/d/1e8kOo3r51b2BWtTs_1uADIA5djfXhPT36s6eHVRIvaU/edit?tab=t.0

Since we have this carried version of `archive/tar` with our byte
accounting patches, it is also means the version of archive/tar has not
kept up with upstream.

our tar-split libraries do not even utilize all the function calls of
our carried archive/tar, so might as well limit anyone else in the world
from calling them as well.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
2025-01-28 11:04:47 -05:00
..
asm.go Add --compress flag to tar-split asm 2018-10-18 12:57:54 +13:00
checksize.go chore: remove refs to deprecated io/ioutil 2023-07-20 23:00:46 +08:00
disasm.go chore: remove refs to deprecated io/ioutil 2023-07-20 23:00:46 +08:00
main.go main: update version 2025-01-20 10:30:03 -05:00
README.md cmd/tar-split: README usage for checksize 2015-08-10 16:22:36 -04:00
tar_benchmark_test.go *.go: move the carrierd archive/tar to internal/ 2025-01-28 11:04:47 -05:00

tar-split utility

Installation

go get -u github.com/vbatts/tar-split/cmd/tar-split

Usage

Disassembly

$ sha256sum archive.tar 
d734a748db93ec873392470510b8a1c88929abd8fae2540dc43d5b26f7537868  archive.tar
$ mkdir ./x
$ tar-split disasm --output tar-data.json.gz ./archive.tar | tar -C ./x -x
time="2015-07-20T15:45:04-04:00" level=info msg="created tar-data.json.gz from ./archive.tar (read 204800 bytes)"

Assembly

$ tar-split asm --output new.tar --input ./tar-data.json.gz  --path ./x/
INFO[0000] created new.tar from ./x/ and ./tar-data.json.gz (wrote 204800 bytes)
$ sha256sum new.tar 
d734a748db93ec873392470510b8a1c88929abd8fae2540dc43d5b26f7537868  new.tar

Estimating metadata size

$ tar-split checksize ./archive.tar
inspecting "./archive.tar" (size 200k)
 -- number of files: 28
 -- size of metadata uncompressed: 28k
 -- size of gzip compressed metadata: 1k