diff options
author | Julian Andres Klode <julian.klode@canonical.com> | 2018-03-08 09:33:39 +0100 |
---|---|---|
committer | Julian Andres Klode <julian.klode@canonical.com> | 2018-03-12 08:56:59 +0100 |
commit | 4de4200ec2717e777bbf99ed82d1b4344f078ec2 (patch) | |
tree | 0b7e2c89802a69564f45e55907b698e63a84f205 /apt-pkg/contrib/fileutl.h | |
parent | 5206249ea92fccf9e812a2d373cbd2f16c623059 (diff) |
apt-pkg: Add support for zstd
zstd is a compression algorithm developed by facebook. At level 19,
it is about 6% worse in size than xz -6, but decompression is multiple
times faster, saving about 40% install time, especially with eatmydata
on cloud instances.
Diffstat (limited to 'apt-pkg/contrib/fileutl.h')
-rw-r--r-- | apt-pkg/contrib/fileutl.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/apt-pkg/contrib/fileutl.h b/apt-pkg/contrib/fileutl.h index 699b8b802..6249b7c16 100644 --- a/apt-pkg/contrib/fileutl.h +++ b/apt-pkg/contrib/fileutl.h @@ -46,6 +46,7 @@ class FileFd friend class Bz2FileFdPrivate; friend class LzmaFileFdPrivate; friend class Lz4FileFdPrivate; + friend class ZstdFileFdPrivate; friend class DirectFileFdPrivate; friend class PipedFileFdPrivate; protected: @@ -76,8 +77,19 @@ class FileFd ReadOnlyGzip, WriteAtomic = ReadWrite | Create | Atomic }; - enum CompressMode { Auto = 'A', None = 'N', Extension = 'E', Gzip = 'G', Bzip2 = 'B', Lzma = 'L', Xz = 'X', Lz4='4' }; - + enum CompressMode + { + Auto = 'A', + None = 'N', + Extension = 'E', + Gzip = 'G', + Bzip2 = 'B', + Lzma = 'L', + Xz = 'X', + Lz4 = '4', + Zstd = 'Z' + }; + inline bool Read(void *To,unsigned long long Size,bool AllowEof) { unsigned long long Jnk; |