COMPRESSION_TOOL(1) General Commands Manual COMPRESSION_TOOL(1)NAME
compression_tool - encode/decode files using the Compression library
SYNOPSIS
compression_tool -encode | -decode [-a algorithm] [-i input_file] [-o output_file] [-v] [-h]
DESCRIPTION
compression_tool encodes (compresses), or decodes (uncompresses) files using the Compression library.
OPTIONS -encode
Encode (compress) the input
-decode
Decode (uncompress) the input
-a algorithm
Set the compression algorithm, valid options are zlib, lzma, lzfse, lz4, lz4_raw. Default is lzfse.
- zlib raw DEFLATE payload, as defined in IETF RFC 1951, encoder is zlib level 5,
- lzma LZMA2 payload inside a XZ container, encoder is LZMA2 preset 6,
- lz4 raw LZ4 payload inside a custom container (described in compression.h),
- lz4_raw raw LZ4 payload,
- lzfse LZFSE payload.
-i input_file
Input file. If omitted, read from standard input.
-o output_file
Output file. If omitted, write to standard output.
-v Increase verbosity. Default is silent operation.
-h Print usage and exit.
COMPRESSION_TOOL(1)
Check Out this Related Man Page
YAA(1) General Commands Manual YAA(1)NAME
yaa - Manipulate YAA archives
SYNOPSIS
yaa verb [options]
DESCRIPTION
yaa creates and manipulates YAA archives.
VERBS
create Archive the contents of the target directory
extract Extract the contents of an archive to the target directory
list List the contents of an archive
info Print archive metadata
convert Convert an archive into another archive
manifest Alias for 'archive -manifest'
index Alias for 'convert -index'
OPTIONS -v Increase verbosity. Default is silent operation.
-h Print usage and exit.
-d target_dir
Target directory. Default is the current directory.
-i input_file
Input file. Default is stdin.
-ioffset input_offset
Bytes to skip in input_file. Default is 0 to read from the beginning of the file.
-isize input_size
Bytes to read from input_file. Default is -1 to read all available data.
-iindex input_index
YAA index corresponding to input_file. The index is used to accelerate sparse archive reading, in conjonction with the entry
name/type selection options.
-o output_file
Output file. Default is stdout.
-a algorithm
Compression algorithm used when creating archives. One of lzfse, lzma, lz4, zlib, raw. Default is lzfse.
-b block_size
Block size used when compressing archives, a number with optional b,k,m,g suffix (bytes are assumed if no suffix is specified).
Default is 4m.
-t worker_threads
Number of worker threads compressing/decompressing data. Default is the number of logical CPU on the running machine.
-wt writer_threads
Number of writer threads extracting archive content. Default is to match worker_threads.
-exclude-metadata
Skip insertion of a leading metadata entry in the generated archives. This metadata entry contains a list of the included fields. It
is printed by the info command.
-include-path prefix
Include entry paths matching prefix. This option can be given multiple times.
-exclude-path prefix
Exclude entry paths matching prefix. This option can be given multiple times.
-include-path-list <prefix_list_file>
File containing a list of path prefixes to include, one entry per line. This option can be given multiple times.
-exclude-path-list <prefix_list_file>
File containing a list of path prefixes to exclude, one entry per line. This option can be given multiple times.
-exclude-name name
Exclude entry paths where a single component of the path matches exactly name. This option can be given multiple times.
-include-type <type_spec>
Include only entries matching the given types. <type_spec> is a word containing one or more of the entry type characters listed
below.
-exclude-type <type_spec>
Exclude only entries matching the given types. <type_spec> is a word containing one or more of the entry type characters listed
below.
-include-field <field_spec>
Add the given fields to the set of fields to include with each entry. This option can be given multiple times. <field_spec> is a
comma separated list of entry field tags listed below.
-exclude-field <field_spec>
Remove the given fields to the set of fields to include with each entry. This option can be given multiple times. <field_spec> is a
comma separated list of entry field tags listed below.
-manifest
Alias for the following options:
-exclude-field dat
-include-field sh1,cks,siz
-a lzfse -b 1m
-index Alias for the following options:
-exclude-field all
-include-field idx
-a lzfse -b 1m
entry types
b block special
c character special
d directory
f regular file
h hard link
l symbolic link
m metadata
p fifo
s socket
entry fields
typ entry type
pat path
lnk link path
dev device id
uid user id
gid group id
mod access permissions
flg flags
mtm modification time
xat extended attributes
acl access control list
cks CRC32 checksum
sh1 SHA1 digest
sh2 SHA2 digest
dat file contents
siz file size
duz disk usage
idx entry index in main archive
yaf YAA fields (in metadata entry)
all alias for all fields
attr alias for uid,gid,mod,flg,mtm
other other fields (not in this list)
default entry fields
typ,pat,lnk,dev,uid,gid,mod,flg,mtm,dat,duz
entry selection
-include-path and -include-path-list options are applied first to select an initial set of entries, then -exclude-path, -exclude-
path-list and -exclude-name are applied to remove entries from this set. If no -include-path or -include-path-list option is given,
all entries are included in the initial set. If a directory is included/excluded, the entire sub-tree is included/excluded.
EXAMPLES
Archive the contents of directory foo into archive foo.yaa, using LZMA compression with 8 MB blocks
yaa archive -d foo -o foo.yaa -a lzma -b 8m
Extract the contents of foo.yaa in directory dst
yaa extract -d dst -i foo.yaa
Create a manifest of the contents of directory foo into foo.manifest, using LZFSE compression with 1 MB blocks
yaa manifest -d foo -o foo.manifest -a lzfse -b 1m
Verify the contents of dst match the manifest foo.manifest
yaa verify -i foo.manifest -d dst -v
Print all entry paths in foo.manifest
yaa list -i foo.manifest
Print all entry paths, uid, gid for regular files in foo.manifest
yaa list -v -i foo.manifest -include-type f -exclude-field all -include-field uid,gid,pat
Create a manifest of the contents of archive foo.yaa in foo.manifest
yaa convert -manifest -v -i foo.yaa -o foo.manifest
Create an index of the contents of archive foo.yaa in foo.index
yaa index -v -i foo.yaa -o foo.index
Extract a subset of entries matching prefix Applications/Mail.app from archive foo.yaa in directory dst
yaa extract -i foo.yaa -include-path Applications/Mail.app -d dst
Extract the same files as in the previous example, but use foo.index to accelerate extraction
yaa extract -i foo.yaa -include-path Applications/Mail.app -d dst -iindex foo.index
YAA(1)