diff --git a/contrib/linux-kernel/0002-lib-Add-zstd-modules.patch b/contrib/linux-kernel/0002-lib-Add-zstd-modules.patch index eb8b8b288..c3bbaed73 100644 --- a/contrib/linux-kernel/0002-lib-Add-zstd-modules.patch +++ b/contrib/linux-kernel/0002-lib-Add-zstd-modules.patch @@ -1,4 +1,4 @@ -From b7f044163968d724be55bf4841fd80babe036dc2 Mon Sep 17 00:00:00 2001 +From 2b29ec569f8438a0307debd29873859ca6d407fc Mon Sep 17 00:00:00 2001 From: Nick Terrell Date: Mon, 17 Jul 2017 17:08:19 -0700 Subject: [PATCH v5 2/5] lib: Add zstd modules @@ -121,26 +121,26 @@ v4 -> v5: - Fix rare compression bug from upstream commit 308047eb5d - Fix bug introduced in v3 when working around the gcc-7 bug - include/linux/zstd.h | 1157 +++++++++++++++ + include/linux/zstd.h | 1155 +++++++++++++++ lib/Kconfig | 8 + lib/Makefile | 2 + lib/zstd/Makefile | 18 + lib/zstd/bitstream.h | 374 +++++ - lib/zstd/compress.c | 3484 +++++++++++++++++++++++++++++++++++++++++++++ - lib/zstd/decompress.c | 2528 ++++++++++++++++++++++++++++++++ + lib/zstd/compress.c | 3482 +++++++++++++++++++++++++++++++++++++++++++++ + lib/zstd/decompress.c | 2526 ++++++++++++++++++++++++++++++++ lib/zstd/entropy_common.c | 243 ++++ - lib/zstd/error_private.h | 53 + + lib/zstd/error_private.h | 51 + lib/zstd/fse.h | 575 ++++++++ lib/zstd/fse_compress.c | 795 +++++++++++ lib/zstd/fse_decompress.c | 332 +++++ lib/zstd/huf.h | 212 +++ lib/zstd/huf_compress.c | 770 ++++++++++ lib/zstd/huf_decompress.c | 960 +++++++++++++ - lib/zstd/mem.h | 151 ++ - lib/zstd/zstd_common.c | 75 + - lib/zstd/zstd_internal.h | 263 ++++ - lib/zstd/zstd_opt.h | 1014 +++++++++++++ - 19 files changed, 13014 insertions(+) + lib/zstd/mem.h | 149 ++ + lib/zstd/zstd_common.c | 73 + + lib/zstd/zstd_internal.h | 261 ++++ + lib/zstd/zstd_opt.h | 1012 +++++++++++++ + 19 files changed, 12998 insertions(+) create mode 100644 include/linux/zstd.h create mode 100644 lib/zstd/Makefile create mode 100644 lib/zstd/bitstream.h @@ -161,18 +161,16 @@ v4 -> v5: diff --git a/include/linux/zstd.h b/include/linux/zstd.h new file mode 100644 -index 0000000..249575e +index 0000000..305efd0 --- /dev/null +++ b/include/linux/zstd.h -@@ -0,0 +1,1157 @@ +@@ -0,0 +1,1155 @@ +/* + * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of https://github.com/facebook/zstd. -+ * An additional grant of patent rights can be found in the PATENTS file in the -+ * same directory. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the @@ -1760,18 +1758,16 @@ index 0000000..a826b99 +#endif /* BITSTREAM_H_MODULE */ diff --git a/lib/zstd/compress.c b/lib/zstd/compress.c new file mode 100644 -index 0000000..f9166cf +index 0000000..ff18ae6 --- /dev/null +++ b/lib/zstd/compress.c -@@ -0,0 +1,3484 @@ +@@ -0,0 +1,3482 @@ +/** + * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of https://github.com/facebook/zstd. -+ * An additional grant of patent rights can be found in the PATENTS file in the -+ * same directory. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the @@ -5250,18 +5246,16 @@ index 0000000..f9166cf +MODULE_DESCRIPTION("Zstd Compressor"); diff --git a/lib/zstd/decompress.c b/lib/zstd/decompress.c new file mode 100644 -index 0000000..b178467 +index 0000000..72df4828 --- /dev/null +++ b/lib/zstd/decompress.c -@@ -0,0 +1,2528 @@ +@@ -0,0 +1,2526 @@ +/** + * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of https://github.com/facebook/zstd. -+ * An additional grant of patent rights can be found in the PATENTS file in the -+ * same directory. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the @@ -8033,18 +8027,16 @@ index 0000000..2b0a643 +} diff --git a/lib/zstd/error_private.h b/lib/zstd/error_private.h new file mode 100644 -index 0000000..1a60b31 +index 0000000..2062ff0 --- /dev/null +++ b/lib/zstd/error_private.h -@@ -0,0 +1,53 @@ +@@ -0,0 +1,51 @@ +/** + * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of https://github.com/facebook/zstd. -+ * An additional grant of patent rights can be found in the PATENTS file in the -+ * same directory. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the @@ -11772,18 +11764,16 @@ index 0000000..6526482 +} diff --git a/lib/zstd/mem.h b/lib/zstd/mem.h new file mode 100644 -index 0000000..3a0f34c +index 0000000..42a697b --- /dev/null +++ b/lib/zstd/mem.h -@@ -0,0 +1,151 @@ +@@ -0,0 +1,149 @@ +/** + * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of https://github.com/facebook/zstd. -+ * An additional grant of patent rights can be found in the PATENTS file in the -+ * same directory. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the @@ -11929,18 +11919,16 @@ index 0000000..3a0f34c +#endif /* MEM_H_MODULE */ diff --git a/lib/zstd/zstd_common.c b/lib/zstd/zstd_common.c new file mode 100644 -index 0000000..a282624 +index 0000000..e5f06d7 --- /dev/null +++ b/lib/zstd/zstd_common.c -@@ -0,0 +1,75 @@ +@@ -0,0 +1,73 @@ +/** + * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of https://github.com/facebook/zstd. -+ * An additional grant of patent rights can be found in the PATENTS file in the -+ * same directory. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the @@ -12010,18 +11998,16 @@ index 0000000..a282624 +} diff --git a/lib/zstd/zstd_internal.h b/lib/zstd/zstd_internal.h new file mode 100644 -index 0000000..1a79fab +index 0000000..a0fb83e --- /dev/null +++ b/lib/zstd/zstd_internal.h -@@ -0,0 +1,263 @@ +@@ -0,0 +1,261 @@ +/** + * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of https://github.com/facebook/zstd. -+ * An additional grant of patent rights can be found in the PATENTS file in the -+ * same directory. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the @@ -12279,18 +12265,16 @@ index 0000000..1a79fab +#endif /* ZSTD_CCOMMON_H_MODULE */ diff --git a/lib/zstd/zstd_opt.h b/lib/zstd/zstd_opt.h new file mode 100644 -index 0000000..55e1b4c +index 0000000..ecdd725 --- /dev/null +++ b/lib/zstd/zstd_opt.h -@@ -0,0 +1,1014 @@ +@@ -0,0 +1,1012 @@ +/** + * Copyright (c) 2016-present, Przemyslaw Skibinski, Yann Collet, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of https://github.com/facebook/zstd. -+ * An additional grant of patent rights can be found in the PATENTS file in the -+ * same directory. + * + * This program is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License version 2 as published by the @@ -13298,4 +13282,4 @@ index 0000000..55e1b4c + +#endif /* ZSTD_OPT_H_91842398743 */ -- -2.9.3 +2.9.5 diff --git a/contrib/linux-kernel/include/linux/zstd.h b/contrib/linux-kernel/include/linux/zstd.h index 249575e24..305efd093 100644 --- a/contrib/linux-kernel/include/linux/zstd.h +++ b/contrib/linux-kernel/include/linux/zstd.h @@ -4,8 +4,6 @@ * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of https://github.com/facebook/zstd. - * An additional grant of patent rights can be found in the PATENTS file in the - * same directory. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the diff --git a/contrib/linux-kernel/lib/zstd/compress.c b/contrib/linux-kernel/lib/zstd/compress.c index f9166cf4f..ff18ae6d6 100644 --- a/contrib/linux-kernel/lib/zstd/compress.c +++ b/contrib/linux-kernel/lib/zstd/compress.c @@ -4,8 +4,6 @@ * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of https://github.com/facebook/zstd. - * An additional grant of patent rights can be found in the PATENTS file in the - * same directory. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the diff --git a/contrib/linux-kernel/lib/zstd/decompress.c b/contrib/linux-kernel/lib/zstd/decompress.c index b17846725..72df4828d 100644 --- a/contrib/linux-kernel/lib/zstd/decompress.c +++ b/contrib/linux-kernel/lib/zstd/decompress.c @@ -4,8 +4,6 @@ * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of https://github.com/facebook/zstd. - * An additional grant of patent rights can be found in the PATENTS file in the - * same directory. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the diff --git a/contrib/linux-kernel/lib/zstd/error_private.h b/contrib/linux-kernel/lib/zstd/error_private.h index 1a60b31f7..2062ff05a 100644 --- a/contrib/linux-kernel/lib/zstd/error_private.h +++ b/contrib/linux-kernel/lib/zstd/error_private.h @@ -4,8 +4,6 @@ * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of https://github.com/facebook/zstd. - * An additional grant of patent rights can be found in the PATENTS file in the - * same directory. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the diff --git a/contrib/linux-kernel/lib/zstd/mem.h b/contrib/linux-kernel/lib/zstd/mem.h index 3a0f34c87..42a697b74 100644 --- a/contrib/linux-kernel/lib/zstd/mem.h +++ b/contrib/linux-kernel/lib/zstd/mem.h @@ -4,8 +4,6 @@ * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of https://github.com/facebook/zstd. - * An additional grant of patent rights can be found in the PATENTS file in the - * same directory. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the diff --git a/contrib/linux-kernel/lib/zstd/zstd_common.c b/contrib/linux-kernel/lib/zstd/zstd_common.c index a282624ee..e5f06d771 100644 --- a/contrib/linux-kernel/lib/zstd/zstd_common.c +++ b/contrib/linux-kernel/lib/zstd/zstd_common.c @@ -4,8 +4,6 @@ * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of https://github.com/facebook/zstd. - * An additional grant of patent rights can be found in the PATENTS file in the - * same directory. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the diff --git a/contrib/linux-kernel/lib/zstd/zstd_internal.h b/contrib/linux-kernel/lib/zstd/zstd_internal.h index 1a79fab9e..a0fb83e34 100644 --- a/contrib/linux-kernel/lib/zstd/zstd_internal.h +++ b/contrib/linux-kernel/lib/zstd/zstd_internal.h @@ -4,8 +4,6 @@ * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of https://github.com/facebook/zstd. - * An additional grant of patent rights can be found in the PATENTS file in the - * same directory. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the diff --git a/contrib/linux-kernel/lib/zstd/zstd_opt.h b/contrib/linux-kernel/lib/zstd/zstd_opt.h index 55e1b4cba..ecdd7259e 100644 --- a/contrib/linux-kernel/lib/zstd/zstd_opt.h +++ b/contrib/linux-kernel/lib/zstd/zstd_opt.h @@ -4,8 +4,6 @@ * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of https://github.com/facebook/zstd. - * An additional grant of patent rights can be found in the PATENTS file in the - * same directory. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License version 2 as published by the diff --git a/contrib/linux-kernel/test/DecompressCrash.c b/contrib/linux-kernel/test/DecompressCrash.c index b5b673aad..2ab7dfe52 100644 --- a/contrib/linux-kernel/test/DecompressCrash.c +++ b/contrib/linux-kernel/test/DecompressCrash.c @@ -2,9 +2,9 @@ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). */ /* diff --git a/contrib/linux-kernel/test/RoundTripCrash.c b/contrib/linux-kernel/test/RoundTripCrash.c index 44c67f3ab..4f968023d 100644 --- a/contrib/linux-kernel/test/RoundTripCrash.c +++ b/contrib/linux-kernel/test/RoundTripCrash.c @@ -2,9 +2,9 @@ * Copyright (c) 2016-present, Yann Collet, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). */ /* diff --git a/contrib/linux-kernel/xxhash_test.c b/contrib/linux-kernel/xxhash_test.c index 5c1101b6f..eb0fb1cd7 100644 --- a/contrib/linux-kernel/xxhash_test.c +++ b/contrib/linux-kernel/xxhash_test.c @@ -2,19 +2,13 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License version 2 as published by the - * Free Software Foundation. This program is dual-licensed; you may select - * either version 2 of the GNU General Public License ("GPL") or BSD license - * ("BSD"). + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). */ /* DO_XXH should be 32 or 64 for xxh32 and xxh64 respectively */ -#define DO_XXH 0 +#define DO_XXH 0 /* DO_CRC should be 0 or 1 */ #define DO_CRC 0 /* Buffer size */ diff --git a/contrib/linux-kernel/zstd_compress_test.c b/contrib/linux-kernel/zstd_compress_test.c index bf856b796..dc17adf81 100644 --- a/contrib/linux-kernel/zstd_compress_test.c +++ b/contrib/linux-kernel/zstd_compress_test.c @@ -2,15 +2,9 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License version 2 as published by the - * Free Software Foundation. This program is dual-licensed; you may select - * either version 2 of the GNU General Public License ("GPL") or BSD license - * ("BSD"). + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). */ /* Compression level or 0 to disable */ diff --git a/contrib/linux-kernel/zstd_decompress_test.c b/contrib/linux-kernel/zstd_decompress_test.c index 4905a5ac5..f6efddd30 100644 --- a/contrib/linux-kernel/zstd_decompress_test.c +++ b/contrib/linux-kernel/zstd_decompress_test.c @@ -2,15 +2,9 @@ * Copyright (c) 2016-present, Facebook, Inc. * All rights reserved. * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - * This program is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License version 2 as published by the - * Free Software Foundation. This program is dual-licensed; you may select - * either version 2 of the GNU General Public License ("GPL") or BSD license - * ("BSD"). + * This source code is licensed under both the BSD-style license (found in the + * LICENSE file in the root directory of this source tree) and the GPLv2 (found + * in the COPYING file in the root directory of this source tree). */ /* Compression level or 0 to disable */