File: gzip-compat.sh

package info (click to toggle)
libzstd 1.5.7%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,348 kB
  • sloc: ansic: 89,030; sh: 3,788; python: 3,466; cpp: 2,927; makefile: 2,329; asm: 390
file content (17 lines) | stat: -rwxr-xr-x 653 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

set -e

# Uncomment the set -v line for debugging
# set -v

# Test gzip specific compression option
if $(command -v $ZSTD_SYMLINK_DIR/gzip); then
    $ZSTD_SYMLINK_DIR/gzip --fast file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
    $ZSTD_SYMLINK_DIR/gzip --best file ; $ZSTD_SYMLINK_DIR/gzip -d file.gz

    # Test -n / --no-name: do not embed original filename in archive
    $ZSTD_SYMLINK_DIR/gzip -n file           ; grep -qv file file.gz  ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
    $ZSTD_SYMLINK_DIR/gzip --no-name file    ; grep -qv file file.gz  ; $ZSTD_SYMLINK_DIR/gzip -d file.gz
    $ZSTD_SYMLINK_DIR/gzip -c --no-name file | grep -qv file
fi