Skip to content

Instantly share code, notes, and snippets.

@severak
Created October 29, 2017 14:11
Show Gist options
  • Select an option

  • Save severak/74765686524128387d21ea903043ebe7 to your computer and use it in GitHub Desktop.

Select an option

Save severak/74765686524128387d21ea903043ebe7 to your computer and use it in GitHub Desktop.
4chandump.log
pi@raspberrypi:~ $ file
Usage: file [-bcEhikLlNnprsvzZ0] [--apple] [--extension] [--mime-encoding] [--mime-type]
[-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
file -C [-m magicfiles]
file [--help]
pi@raspberrypi:~ $ cd Downloads/
pi@raspberrypi:~/Downloads $ file _pol_118.zst
_pol_118.zst: Zstandard compressed data (v0.8+), Dictionary ID: None
pi@raspberrypi:~/Downloads $ apt-cache search zstd
libzstd-dev - fast lossless compression algorithm -- development files
libzstd1 - fast lossless compression algorithm
zstd - fast lossless compression algorithm -- CLI tool
pi@raspberrypi:~/Downloads $ sudo apt-get install zstd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
zsh zsh-common
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
libzstd1
The following NEW packages will be installed:
libzstd1 zstd
0 upgraded, 2 newly installed, 0 to remove and 76 not upgraded.
Need to get 385 kB of archives.
After this operation, 1,528 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrordirector.raspbian.org/raspbian stretch/main armhf libzstd1 armhf 1.1.2-1 [160 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian stretch/main armhf zstd armhf 1.1.2-1 [225 kB]
Fetched 385 kB in 0s (1,022 kB/s)
Selecting previously unselected package libzstd1.
(Reading database ... 128283 files and directories currently installed.)
Preparing to unpack .../libzstd1_1.1.2-1_armhf.deb ...
Unpacking libzstd1 (1.1.2-1) ...
Selecting previously unselected package zstd.
Preparing to unpack .../zstd_1.1.2-1_armhf.deb ...
Unpacking zstd (1.1.2-1) ...
Setting up libzstd1 (1.1.2-1) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up zstd (1.1.2-1) ...
pi@raspberrypi:~/Downloads $ zstd --help
*** zstd command line interface 32-bits v1.1.2, by Yann Collet ***
Usage :
zstd [args] [FILE(s)] [-o file]
FILE : a filename
with no FILE, or when FILE is - , read standard input
Arguments :
-# : # compression level (1-19, default:3)
-d : decompression
-D file: use `file` as Dictionary
-o file: result stored into `file` (only if 1 input file)
-f : overwrite output without prompting
--rm : remove source file(s) after successful de/compression
-k : preserve source file(s) (default)
-h/-H : display help/long help and exit
Advanced arguments :
-V : display Version number and exit
-v : verbose mode; specify multiple times to increase log level (default:2)
-q : suppress warnings; specify twice to suppress errors too
-c : force write to standard output, even if it is the console
-r : operate recursively on directories
--ultra : enable levels beyond 19, up to 22 (requires more memory)
--no-dictID : don't write dictID into header (dictionary compression)
--[no-]check : integrity check (default:enabled)
--test : test compressed file integrity
--[no-]sparse : sparse mode (default:enabled on file, disabled on stdout)
-M# : Set a memory usage limit for decompression
-- : All arguments after "--" are treated as files
Dictionary builder :
--train ## : create a dictionary from a training set of files
-o file : `file` is dictionary name (default: dictionary)
--maxdict ## : limit dictionary to specified size (default : 112640)
-s# : dictionary selectivity level (default: 9)
--dictID ## : force dictionary ID to specified value (default: random)
Benchmark arguments :
-b# : benchmark file(s), using # compression level (default : 1)
-e# : test all compression levels from -bX to # (default: 1)
-i# : minimum evaluation time in seconds (default : 3s)
-B# : cut file into independent blocks of size # (default: no block)
pi@raspberrypi:~/Downloads $ zstd -d _pol_118.zst
_pol_118.zst : 89076912 bytes
pi@raspberrypi:~/Downloads $ file _pol_118
_pol_118: UTF-8 Unicode text, with very long lines
pi@raspberrypi:~/Downloads $ wtf
bash: wtf: command not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment