-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathxz.functions
More file actions
17 lines (15 loc) · 945 Bytes
/
xz.functions
File metadata and controls
17 lines (15 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This file is part of shellfire compress. It is subject to the licence terms in the COPYRIGHT file found in the top-level directory of this distribution and at https://raw.githubusercontent.com/shellfire-dev/compress/master/COPYRIGHT. No part of swaddle, including this file, may be copied, modified, propagated, or distributed except according to the terms contained in the COPYRIGHT file.
# Copyright © 2014-2015 The developers of shellfire compress. See the COPYRIGHT file in the top-level directory of this distribution and at https://raw.githubusercontent.com/shellfire-dev/compress/master/COPYRIGHT.
# pixz
core_dependency_requires '*' pixz xz touch
compress_xz()
{
# pixz is c. 4 bytes worse in 3M, but much faster
if core_compatibility_whichNoOutput pixz; then
pixz -t -9 -e -i "$1" -o "$1".xz
else
# --format=raw knocks off 32 bytes+ but is not auto-detectable.
xz -9 -c -q -f -e "$1" >"$1".xz
fi
touch -r "$1" "$1".xz
}