aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/lzma/liblzma/common
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2024-03-21 01:54:21 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2024-03-21 02:05:24 +0300
commit1f10341ce6cb9a6be3d28925d43bd3360c256d27 (patch)
tree1285bccd1140f69412cbf72f969da0d9af7fd9a5 /contrib/libs/lzma/liblzma/common
parentda5121777959fc5aab4a13d1cd50e5e6b9aa8972 (diff)
downloadydb-1f10341ce6cb9a6be3d28925d43bd3360c256d27.tar.gz
Update contrib/libs/lzma to 5.6.0
de6c124a343d1b577cd3e4a152607415cfd3de0e
Diffstat (limited to 'contrib/libs/lzma/liblzma/common')
-rw-r--r--contrib/libs/lzma/liblzma/common/alone_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/alone_decoder.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/alone_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/auto_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/block_buffer_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/block_buffer_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/block_buffer_encoder.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/block_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/block_decoder.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/block_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/block_encoder.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/block_header_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/block_header_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/block_util.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/common.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/common.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/easy_buffer_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/easy_decoder_memusage.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/easy_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/easy_encoder_memusage.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/easy_preset.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/easy_preset.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/file_info.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/filter_buffer_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/filter_buffer_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/filter_common.c14
-rw-r--r--contrib/libs/lzma/liblzma/common/filter_common.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/filter_decoder.c13
-rw-r--r--contrib/libs/lzma/liblzma/common/filter_decoder.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/filter_encoder.c31
-rw-r--r--contrib/libs/lzma/liblzma/common/filter_encoder.h11
-rw-r--r--contrib/libs/lzma/liblzma/common/filter_flags_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/filter_flags_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/hardware_cputhreads.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/hardware_physmem.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/index.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/index.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/index_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/index_decoder.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/index_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/index_encoder.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/index_hash.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/lzip_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/lzip_decoder.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/memcmplen.h24
-rw-r--r--contrib/libs/lzma/liblzma/common/microlzma_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/microlzma_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/outqueue.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/outqueue.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_buffer_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_buffer_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_decoder.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_decoder_mt.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_encoder_mt.c25
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_flags_common.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_flags_common.h5
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_flags_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/stream_flags_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/string_conversion.c14
-rw-r--r--contrib/libs/lzma/liblzma/common/vli_decoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/vli_encoder.c5
-rw-r--r--contrib/libs/lzma/liblzma/common/vli_size.c5
64 files changed, 194 insertions, 223 deletions
diff --git a/contrib/libs/lzma/liblzma/common/alone_decoder.c b/contrib/libs/lzma/liblzma/common/alone_decoder.c
index 1dc85badf9..78af651578 100644
--- a/contrib/libs/lzma/liblzma/common/alone_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/alone_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file alone_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "alone_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/alone_decoder.h b/contrib/libs/lzma/liblzma/common/alone_decoder.h
index dfa031aa77..61ee24d97f 100644
--- a/contrib/libs/lzma/liblzma/common/alone_decoder.h
+++ b/contrib/libs/lzma/liblzma/common/alone_decoder.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file alone_decoder.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_ALONE_DECODER_H
diff --git a/contrib/libs/lzma/liblzma/common/alone_encoder.c b/contrib/libs/lzma/liblzma/common/alone_encoder.c
index 7d3812fa6e..21b039509a 100644
--- a/contrib/libs/lzma/liblzma/common/alone_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/alone_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file alone_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/auto_decoder.c b/contrib/libs/lzma/liblzma/common/auto_decoder.c
index 2a5c0894d1..fdd520f905 100644
--- a/contrib/libs/lzma/liblzma/common/auto_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/auto_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file auto_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "stream_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/block_buffer_decoder.c b/contrib/libs/lzma/liblzma/common/block_buffer_decoder.c
index b0ded90ddc..55566cd2f2 100644
--- a/contrib/libs/lzma/liblzma/common/block_buffer_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/block_buffer_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_buffer_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "block_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/block_buffer_encoder.c b/contrib/libs/lzma/liblzma/common/block_buffer_encoder.c
index fdef02de89..df3b90e8a1 100644
--- a/contrib/libs/lzma/liblzma/common/block_buffer_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/block_buffer_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_buffer_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "block_buffer_encoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/block_buffer_encoder.h b/contrib/libs/lzma/liblzma/common/block_buffer_encoder.h
index 653207f734..5274ac40d3 100644
--- a/contrib/libs/lzma/liblzma/common/block_buffer_encoder.h
+++ b/contrib/libs/lzma/liblzma/common/block_buffer_encoder.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_buffer_encoder.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_BLOCK_BUFFER_ENCODER_H
diff --git a/contrib/libs/lzma/liblzma/common/block_decoder.c b/contrib/libs/lzma/liblzma/common/block_decoder.c
index be647d4855..2e369d316b 100644
--- a/contrib/libs/lzma/liblzma/common/block_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/block_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "block_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/block_decoder.h b/contrib/libs/lzma/liblzma/common/block_decoder.h
index 718c5ced88..2cbf9ba6db 100644
--- a/contrib/libs/lzma/liblzma/common/block_decoder.h
+++ b/contrib/libs/lzma/liblzma/common/block_decoder.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_decoder.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_BLOCK_DECODER_H
diff --git a/contrib/libs/lzma/liblzma/common/block_encoder.c b/contrib/libs/lzma/liblzma/common/block_encoder.c
index 4a136ef65e..ce8c1de694 100644
--- a/contrib/libs/lzma/liblzma/common/block_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/block_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "block_encoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/block_encoder.h b/contrib/libs/lzma/liblzma/common/block_encoder.h
index bd97c186e5..b7dfe9a084 100644
--- a/contrib/libs/lzma/liblzma/common/block_encoder.h
+++ b/contrib/libs/lzma/liblzma/common/block_encoder.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_encoder.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_BLOCK_ENCODER_H
diff --git a/contrib/libs/lzma/liblzma/common/block_header_decoder.c b/contrib/libs/lzma/liblzma/common/block_header_decoder.c
index c4935dcf46..f0b2fbe54d 100644
--- a/contrib/libs/lzma/liblzma/common/block_header_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/block_header_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_header_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/block_header_encoder.c b/contrib/libs/lzma/liblzma/common/block_header_encoder.c
index 160425d27a..45e57a26ab 100644
--- a/contrib/libs/lzma/liblzma/common/block_header_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/block_header_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_header_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/block_util.c b/contrib/libs/lzma/liblzma/common/block_util.c
index acb311142c..191f6d444a 100644
--- a/contrib/libs/lzma/liblzma/common/block_util.c
+++ b/contrib/libs/lzma/liblzma/common/block_util.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file block_util.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/common.c b/contrib/libs/lzma/liblzma/common/common.c
index adb50d785d..cc0e06a51b 100644
--- a/contrib/libs/lzma/liblzma/common/common.c
+++ b/contrib/libs/lzma/liblzma/common/common.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file common.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/common.h b/contrib/libs/lzma/liblzma/common/common.h
index 378923e401..20af32f6d6 100644
--- a/contrib/libs/lzma/liblzma/common/common.h
+++ b/contrib/libs/lzma/liblzma/common/common.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file common.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_COMMON_H
diff --git a/contrib/libs/lzma/liblzma/common/easy_buffer_encoder.c b/contrib/libs/lzma/liblzma/common/easy_buffer_encoder.c
index 48eb56f5cc..da610cea6b 100644
--- a/contrib/libs/lzma/liblzma/common/easy_buffer_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/easy_buffer_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file easy_buffer_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "easy_preset.h"
diff --git a/contrib/libs/lzma/liblzma/common/easy_decoder_memusage.c b/contrib/libs/lzma/liblzma/common/easy_decoder_memusage.c
index 20bcd5b717..0c76f10033 100644
--- a/contrib/libs/lzma/liblzma/common/easy_decoder_memusage.c
+++ b/contrib/libs/lzma/liblzma/common/easy_decoder_memusage.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file easy_decoder_memusage.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "easy_preset.h"
diff --git a/contrib/libs/lzma/liblzma/common/easy_encoder.c b/contrib/libs/lzma/liblzma/common/easy_encoder.c
index 5cb492dd06..8dfe29610f 100644
--- a/contrib/libs/lzma/liblzma/common/easy_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/easy_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file easy_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "easy_preset.h"
diff --git a/contrib/libs/lzma/liblzma/common/easy_encoder_memusage.c b/contrib/libs/lzma/liblzma/common/easy_encoder_memusage.c
index e910575842..1184ac6654 100644
--- a/contrib/libs/lzma/liblzma/common/easy_encoder_memusage.c
+++ b/contrib/libs/lzma/liblzma/common/easy_encoder_memusage.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file easy_encoder_memusage.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "easy_preset.h"
diff --git a/contrib/libs/lzma/liblzma/common/easy_preset.c b/contrib/libs/lzma/liblzma/common/easy_preset.c
index 2f9859860a..7908a2bb73 100644
--- a/contrib/libs/lzma/liblzma/common/easy_preset.c
+++ b/contrib/libs/lzma/liblzma/common/easy_preset.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file easy_preset.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "easy_preset.h"
diff --git a/contrib/libs/lzma/liblzma/common/easy_preset.h b/contrib/libs/lzma/liblzma/common/easy_preset.h
index 382ade8940..d0ca1a6234 100644
--- a/contrib/libs/lzma/liblzma/common/easy_preset.h
+++ b/contrib/libs/lzma/liblzma/common/easy_preset.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file easy_preset.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/file_info.c b/contrib/libs/lzma/liblzma/common/file_info.c
index 799bb024fe..7c85084a70 100644
--- a/contrib/libs/lzma/liblzma/common/file_info.c
+++ b/contrib/libs/lzma/liblzma/common/file_info.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file file_info.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "index_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/filter_buffer_decoder.c b/contrib/libs/lzma/liblzma/common/filter_buffer_decoder.c
index 6620986eea..e80c582c91 100644
--- a/contrib/libs/lzma/liblzma/common/filter_buffer_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/filter_buffer_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file filter_buffer_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "filter_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/filter_buffer_encoder.c b/contrib/libs/lzma/liblzma/common/filter_buffer_encoder.c
index dda18e3d8e..7fb8922ae9 100644
--- a/contrib/libs/lzma/liblzma/common/filter_buffer_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/filter_buffer_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file filter_buffer_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "filter_encoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/filter_common.c b/contrib/libs/lzma/liblzma/common/filter_common.c
index fa0927cf9b..2da6bd9c77 100644
--- a/contrib/libs/lzma/liblzma/common/filter_common.c
+++ b/contrib/libs/lzma/liblzma/common/filter_common.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file filter_common.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "filter_common.h"
@@ -122,6 +121,15 @@ static const struct {
.changes_size = false,
},
#endif
+#if defined(HAVE_ENCODER_RISCV) || defined(HAVE_DECODER_RISCV)
+ {
+ .id = LZMA_FILTER_RISCV,
+ .options_size = sizeof(lzma_options_bcj),
+ .non_last_ok = true,
+ .last_ok = false,
+ .changes_size = false,
+ },
+#endif
#if defined(HAVE_ENCODER_DELTA) || defined(HAVE_DECODER_DELTA)
{
.id = LZMA_FILTER_DELTA,
diff --git a/contrib/libs/lzma/liblzma/common/filter_common.h b/contrib/libs/lzma/liblzma/common/filter_common.h
index 2e47bb69f7..95f9fe2701 100644
--- a/contrib/libs/lzma/liblzma/common/filter_common.h
+++ b/contrib/libs/lzma/liblzma/common/filter_common.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file filter_common.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_FILTER_COMMON_H
diff --git a/contrib/libs/lzma/liblzma/common/filter_decoder.c b/contrib/libs/lzma/liblzma/common/filter_decoder.c
index fa53f5bdba..77441e5449 100644
--- a/contrib/libs/lzma/liblzma/common/filter_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/filter_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file filter_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "filter_decoder.h"
@@ -121,6 +120,14 @@ static const lzma_filter_decoder decoders[] = {
.props_decode = &lzma_simple_props_decode,
},
#endif
+#ifdef HAVE_DECODER_RISCV
+ {
+ .id = LZMA_FILTER_RISCV,
+ .init = &lzma_simple_riscv_decoder_init,
+ .memusage = NULL,
+ .props_decode = &lzma_simple_props_decode,
+ },
+#endif
#ifdef HAVE_DECODER_DELTA
{
.id = LZMA_FILTER_DELTA,
diff --git a/contrib/libs/lzma/liblzma/common/filter_decoder.h b/contrib/libs/lzma/liblzma/common/filter_decoder.h
index 2dac602828..e610bc1f44 100644
--- a/contrib/libs/lzma/liblzma/common/filter_decoder.h
+++ b/contrib/libs/lzma/liblzma/common/filter_decoder.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file filter_decoder.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_FILTER_DECODER_H
diff --git a/contrib/libs/lzma/liblzma/common/filter_encoder.c b/contrib/libs/lzma/liblzma/common/filter_encoder.c
index c7777dfef8..523d373100 100644
--- a/contrib/libs/lzma/liblzma/common/filter_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/filter_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file filter_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "filter_encoder.h"
@@ -33,7 +32,8 @@ typedef struct {
/// Calculates the recommended Uncompressed Size for .xz Blocks to
/// which the input data can be split to make multithreaded
/// encoding possible. If this is NULL, it is assumed that
- /// the encoder is fast enough with single thread.
+ /// the encoder is fast enough with single thread. If the options
+ /// are invalid, UINT64_MAX is returned.
uint64_t (*block_size)(const void *options);
/// Tells the size of the Filter Properties field. If options are
@@ -158,6 +158,16 @@ static const lzma_filter_encoder encoders[] = {
.props_encode = &lzma_simple_props_encode,
},
#endif
+#ifdef HAVE_ENCODER_RISCV
+ {
+ .id = LZMA_FILTER_RISCV,
+ .init = &lzma_simple_riscv_encoder_init,
+ .memusage = NULL,
+ .block_size = NULL,
+ .props_size_get = &lzma_simple_props_size,
+ .props_encode = &lzma_simple_props_encode,
+ },
+#endif
#ifdef HAVE_ENCODER_DELTA
{
.id = LZMA_FILTER_DELTA,
@@ -248,26 +258,29 @@ lzma_raw_encoder_memusage(const lzma_filter *filters)
}
-extern uint64_t
+extern LZMA_API(uint64_t)
lzma_mt_block_size(const lzma_filter *filters)
{
+ if (filters == NULL)
+ return UINT64_MAX;
+
uint64_t max = 0;
for (size_t i = 0; filters[i].id != LZMA_VLI_UNKNOWN; ++i) {
const lzma_filter_encoder *const fe
= encoder_find(filters[i].id);
+ if (fe == NULL)
+ return UINT64_MAX;
+
if (fe->block_size != NULL) {
const uint64_t size
= fe->block_size(filters[i].options);
- if (size == 0)
- return 0;
-
if (size > max)
max = size;
}
}
- return max;
+ return max == 0 ? UINT64_MAX : max;
}
diff --git a/contrib/libs/lzma/liblzma/common/filter_encoder.h b/contrib/libs/lzma/liblzma/common/filter_encoder.h
index f1d5683fe7..88f2dafa43 100644
--- a/contrib/libs/lzma/liblzma/common/filter_encoder.h
+++ b/contrib/libs/lzma/liblzma/common/filter_encoder.h
@@ -1,13 +1,12 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
-/// \file filter_encoder.c
+/// \file filter_encoder.h
/// \brief Filter ID mapping to filter-specific functions
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_FILTER_ENCODER_H
@@ -16,10 +15,6 @@
#include "common.h"
-// FIXME: Might become a part of the public API.
-extern uint64_t lzma_mt_block_size(const lzma_filter *filters);
-
-
extern lzma_ret lzma_raw_encoder_init(
lzma_next_coder *next, const lzma_allocator *allocator,
const lzma_filter *filters);
diff --git a/contrib/libs/lzma/liblzma/common/filter_flags_decoder.c b/contrib/libs/lzma/liblzma/common/filter_flags_decoder.c
index ddfb085943..0f5d204d47 100644
--- a/contrib/libs/lzma/liblzma/common/filter_flags_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/filter_flags_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file filter_flags_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "filter_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/filter_flags_encoder.c b/contrib/libs/lzma/liblzma/common/filter_flags_encoder.c
index b57b9fd80b..e1d65884fb 100644
--- a/contrib/libs/lzma/liblzma/common/filter_flags_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/filter_flags_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file filter_flags_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "filter_encoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/hardware_cputhreads.c b/contrib/libs/lzma/liblzma/common/hardware_cputhreads.c
index 5d246d2cc0..4ce852b42c 100644
--- a/contrib/libs/lzma/liblzma/common/hardware_cputhreads.c
+++ b/contrib/libs/lzma/liblzma/common/hardware_cputhreads.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file hardware_cputhreads.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/hardware_physmem.c b/contrib/libs/lzma/liblzma/common/hardware_physmem.c
index a2bbbe29d4..1bc34864e8 100644
--- a/contrib/libs/lzma/liblzma/common/hardware_physmem.c
+++ b/contrib/libs/lzma/liblzma/common/hardware_physmem.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file hardware_physmem.c
@@ -5,9 +7,6 @@
//
// Author: Jonathan Nieder
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/index.c b/contrib/libs/lzma/liblzma/common/index.c
index 8a35f4398d..6add6a6835 100644
--- a/contrib/libs/lzma/liblzma/common/index.c
+++ b/contrib/libs/lzma/liblzma/common/index.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file index.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/index.h b/contrib/libs/lzma/liblzma/common/index.h
index 7b27d7004c..007e1188f2 100644
--- a/contrib/libs/lzma/liblzma/common/index.h
+++ b/contrib/libs/lzma/liblzma/common/index.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file index.h
@@ -12,9 +14,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_INDEX_H
diff --git a/contrib/libs/lzma/liblzma/common/index_decoder.c b/contrib/libs/lzma/liblzma/common/index_decoder.c
index 19a31b3e94..f105ff04e8 100644
--- a/contrib/libs/lzma/liblzma/common/index_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/index_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file index_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "index_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/index_decoder.h b/contrib/libs/lzma/liblzma/common/index_decoder.h
index 3fec483331..5351d2f0df 100644
--- a/contrib/libs/lzma/liblzma/common/index_decoder.h
+++ b/contrib/libs/lzma/liblzma/common/index_decoder.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file index_decoder.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_INDEX_DECODER_H
diff --git a/contrib/libs/lzma/liblzma/common/index_encoder.c b/contrib/libs/lzma/liblzma/common/index_encoder.c
index 204490cc19..ecc299c015 100644
--- a/contrib/libs/lzma/liblzma/common/index_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/index_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file index_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "index_encoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/index_encoder.h b/contrib/libs/lzma/liblzma/common/index_encoder.h
index 4d55cd1047..29ba110669 100644
--- a/contrib/libs/lzma/liblzma/common/index_encoder.h
+++ b/contrib/libs/lzma/liblzma/common/index_encoder.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file index_encoder.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_INDEX_ENCODER_H
diff --git a/contrib/libs/lzma/liblzma/common/index_hash.c b/contrib/libs/lzma/liblzma/common/index_hash.c
index 52c3d65077..caa5967ca4 100644
--- a/contrib/libs/lzma/liblzma/common/index_hash.c
+++ b/contrib/libs/lzma/liblzma/common/index_hash.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file index_hash.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/lzip_decoder.c b/contrib/libs/lzma/liblzma/common/lzip_decoder.c
index 88cc7ffd23..651a0ae712 100644
--- a/contrib/libs/lzma/liblzma/common/lzip_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/lzip_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file lzip_decoder.c
@@ -6,9 +8,6 @@
// Author: Michał Górny
// Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "lzip_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/lzip_decoder.h b/contrib/libs/lzma/liblzma/common/lzip_decoder.h
index 33a01c352c..0e1f7bebd4 100644
--- a/contrib/libs/lzma/liblzma/common/lzip_decoder.h
+++ b/contrib/libs/lzma/liblzma/common/lzip_decoder.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file lzip_decoder.h
@@ -5,9 +7,6 @@
//
// Author: Michał Górny
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_LZIP_DECODER_H
diff --git a/contrib/libs/lzma/liblzma/common/memcmplen.h b/contrib/libs/lzma/liblzma/common/memcmplen.h
index 99d9c519cc..d8c42040d3 100644
--- a/contrib/libs/lzma/liblzma/common/memcmplen.h
+++ b/contrib/libs/lzma/liblzma/common/memcmplen.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file memcmplen.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_MEMCMPLEN_H
@@ -24,7 +23,8 @@
// can use the intrinsics without the header file.
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
&& defined(_MSC_VER) \
- && defined(_M_X64) \
+ && (defined(_M_X64) \
+ || defined(_M_ARM64) || defined(_M_ARM64EC)) \
&& !defined(__INTEL_COMPILER)
# include <intrin.h>
#endif
@@ -57,20 +57,22 @@ lzma_memcmplen(const uint8_t *buf1, const uint8_t *buf2,
assert(limit <= UINT32_MAX / 2);
#if defined(TUKLIB_FAST_UNALIGNED_ACCESS) \
- && ((TUKLIB_GNUC_REQ(3, 4) && defined(__x86_64__)) \
+ && (((TUKLIB_GNUC_REQ(3, 4) || defined(__clang__)) \
+ && (defined(__x86_64__) \
+ || defined(__aarch64__))) \
|| (defined(__INTEL_COMPILER) && defined(__x86_64__)) \
|| (defined(__INTEL_COMPILER) && defined(_M_X64)) \
- || (defined(_MSC_VER) && defined(_M_X64)))
- // I keep this x86-64 only for now since that's where I know this
- // to be a good method. This may be fine on other 64-bit CPUs too.
- // On big endian one should use xor instead of subtraction and switch
- // to __builtin_clzll().
+ || (defined(_MSC_VER) && (defined(_M_X64) \
+ || defined(_M_ARM64) || defined(_M_ARM64EC))))
+ // This is only for x86-64 and ARM64 for now. This might be fine on
+ // other 64-bit processors too. On big endian one should use xor
+ // instead of subtraction and switch to __builtin_clzll().
#define LZMA_MEMCMPLEN_EXTRA 8
while (len < limit) {
const uint64_t x = read64ne(buf1 + len) - read64ne(buf2 + len);
if (x != 0) {
// MSVC or Intel C compiler on Windows
-# if (defined(_MSC_VER) || defined(__INTEL_COMPILER)) && defined(_M_X64)
+# if defined(_MSC_VER) || defined(__INTEL_COMPILER)
unsigned long tmp;
_BitScanForward64(&tmp, x);
len += (uint32_t)tmp >> 3;
diff --git a/contrib/libs/lzma/liblzma/common/microlzma_decoder.c b/contrib/libs/lzma/liblzma/common/microlzma_decoder.c
index e473373daa..882cb2c808 100644
--- a/contrib/libs/lzma/liblzma/common/microlzma_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/microlzma_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file microlzma_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "lzma_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/microlzma_encoder.c b/contrib/libs/lzma/liblzma/common/microlzma_encoder.c
index a787ca25b8..45ec0b12f4 100644
--- a/contrib/libs/lzma/liblzma/common/microlzma_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/microlzma_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file microlzma_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "lzma_encoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/outqueue.c b/contrib/libs/lzma/liblzma/common/outqueue.c
index 71e8648a29..eb018eb42b 100644
--- a/contrib/libs/lzma/liblzma/common/outqueue.c
+++ b/contrib/libs/lzma/liblzma/common/outqueue.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file outqueue.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "outqueue.h"
diff --git a/contrib/libs/lzma/liblzma/common/outqueue.h b/contrib/libs/lzma/liblzma/common/outqueue.h
index 596911e95e..ae56f636e8 100644
--- a/contrib/libs/lzma/liblzma/common/outqueue.h
+++ b/contrib/libs/lzma/liblzma/common/outqueue.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file outqueue.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/stream_buffer_decoder.c b/contrib/libs/lzma/liblzma/common/stream_buffer_decoder.c
index b9745b5dbe..c4f91fb498 100644
--- a/contrib/libs/lzma/liblzma/common/stream_buffer_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/stream_buffer_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_buffer_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "stream_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/stream_buffer_encoder.c b/contrib/libs/lzma/liblzma/common/stream_buffer_encoder.c
index 73157590e6..04d5869594 100644
--- a/contrib/libs/lzma/liblzma/common/stream_buffer_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/stream_buffer_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_buffer_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/stream_decoder.c b/contrib/libs/lzma/liblzma/common/stream_decoder.c
index 64283812f2..7f42684136 100644
--- a/contrib/libs/lzma/liblzma/common/stream_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/stream_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "stream_decoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/stream_decoder.h b/contrib/libs/lzma/liblzma/common/stream_decoder.h
index c13c6ba127..5803715374 100644
--- a/contrib/libs/lzma/liblzma/common/stream_decoder.h
+++ b/contrib/libs/lzma/liblzma/common/stream_decoder.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_decoder.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_STREAM_DECODER_H
diff --git a/contrib/libs/lzma/liblzma/common/stream_decoder_mt.c b/contrib/libs/lzma/liblzma/common/stream_decoder_mt.c
index 76212b46da..244624a479 100644
--- a/contrib/libs/lzma/liblzma/common/stream_decoder_mt.c
+++ b/contrib/libs/lzma/liblzma/common/stream_decoder_mt.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_decoder_mt.c
@@ -6,9 +8,6 @@
// Authors: Sebastian Andrzej Siewior
// Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/stream_encoder.c b/contrib/libs/lzma/liblzma/common/stream_encoder.c
index ee92046018..e7e5b3fce7 100644
--- a/contrib/libs/lzma/liblzma/common/stream_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/stream_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "block_encoder.h"
diff --git a/contrib/libs/lzma/liblzma/common/stream_encoder_mt.c b/contrib/libs/lzma/liblzma/common/stream_encoder_mt.c
index f64de9bdbc..f0fef15233 100644
--- a/contrib/libs/lzma/liblzma/common/stream_encoder_mt.c
+++ b/contrib/libs/lzma/liblzma/common/stream_encoder_mt.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_encoder_mt.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "filter_encoder.h"
@@ -979,20 +978,18 @@ get_options(const lzma_mt *options, lzma_options_easy *opt_easy,
*filters = opt_easy->filters;
}
- // Block size
- if (options->block_size > 0) {
- if (options->block_size > BLOCK_SIZE_MAX)
- return LZMA_OPTIONS_ERROR;
-
+ // If the Block size is not set, determine it from the filter chain.
+ if (options->block_size > 0)
*block_size = options->block_size;
- } else {
- // Determine the Block size from the filter chain.
+ else
*block_size = lzma_mt_block_size(*filters);
- if (*block_size == 0)
- return LZMA_OPTIONS_ERROR;
- assert(*block_size <= BLOCK_SIZE_MAX);
- }
+ // UINT64_MAX > BLOCK_SIZE_MAX, so the second condition
+ // should be optimized out by any reasonable compiler.
+ // The second condition should be there in the unlikely event that
+ // the macros change and UINT64_MAX < BLOCK_SIZE_MAX.
+ if (*block_size > BLOCK_SIZE_MAX || *block_size == UINT64_MAX)
+ return LZMA_OPTIONS_ERROR;
// Calculate the maximum amount output that a single output buffer
// may need to hold. This is the same as the maximum total size of
diff --git a/contrib/libs/lzma/liblzma/common/stream_flags_common.c b/contrib/libs/lzma/liblzma/common/stream_flags_common.c
index fbe8eb8abd..41b8dcb70d 100644
--- a/contrib/libs/lzma/liblzma/common/stream_flags_common.c
+++ b/contrib/libs/lzma/liblzma/common/stream_flags_common.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_flags_common.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "stream_flags_common.h"
diff --git a/contrib/libs/lzma/liblzma/common/stream_flags_common.h b/contrib/libs/lzma/liblzma/common/stream_flags_common.h
index 84e96ba1ff..28729dbcb6 100644
--- a/contrib/libs/lzma/liblzma/common/stream_flags_common.h
+++ b/contrib/libs/lzma/liblzma/common/stream_flags_common.h
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_flags_common.h
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef LZMA_STREAM_FLAGS_COMMON_H
diff --git a/contrib/libs/lzma/liblzma/common/stream_flags_decoder.c b/contrib/libs/lzma/liblzma/common/stream_flags_decoder.c
index b8d263ba44..522c98b6fd 100644
--- a/contrib/libs/lzma/liblzma/common/stream_flags_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/stream_flags_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_flags_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "stream_flags_common.h"
diff --git a/contrib/libs/lzma/liblzma/common/stream_flags_encoder.c b/contrib/libs/lzma/liblzma/common/stream_flags_encoder.c
index b98ab17c45..f94b5cd0a2 100644
--- a/contrib/libs/lzma/liblzma/common/stream_flags_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/stream_flags_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file stream_flags_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "stream_flags_common.h"
diff --git a/contrib/libs/lzma/liblzma/common/string_conversion.c b/contrib/libs/lzma/liblzma/common/string_conversion.c
index d2c1e80936..92d9032bdd 100644
--- a/contrib/libs/lzma/liblzma/common/string_conversion.c
+++ b/contrib/libs/lzma/liblzma/common/string_conversion.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file string_conversion.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "filter_common.h"
@@ -250,7 +249,9 @@ static const char *parse_options(const char **const str, const char *str_end,
|| defined(HAVE_ENCODER_IA64) \
|| defined(HAVE_DECODER_IA64) \
|| defined(HAVE_ENCODER_SPARC) \
- || defined(HAVE_DECODER_SPARC)
+ || defined(HAVE_DECODER_SPARC) \
+ || defined(HAVE_ENCODER_RISCV) \
+ || defined(HAVE_DECODER_RISCV)
static const option_map bcj_optmap[] = {
{
.name = "start",
@@ -509,6 +510,11 @@ static const struct {
&parse_bcj, bcj_optmap, 1, 1, true },
#endif
+#if defined(HAVE_ENCODER_RISCV) || defined(HAVE_DECODER_RISCV)
+ { "riscv", sizeof(lzma_options_bcj), LZMA_FILTER_RISCV,
+ &parse_bcj, bcj_optmap, 1, 1, true },
+#endif
+
#if defined(HAVE_ENCODER_POWERPC) || defined(HAVE_DECODER_POWERPC)
{ "powerpc", sizeof(lzma_options_bcj), LZMA_FILTER_POWERPC,
&parse_bcj, bcj_optmap, 1, 1, true },
diff --git a/contrib/libs/lzma/liblzma/common/vli_decoder.c b/contrib/libs/lzma/liblzma/common/vli_decoder.c
index af2799d1fb..3254ccc35b 100644
--- a/contrib/libs/lzma/liblzma/common/vli_decoder.c
+++ b/contrib/libs/lzma/liblzma/common/vli_decoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file vli_decoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/vli_encoder.c b/contrib/libs/lzma/liblzma/common/vli_encoder.c
index f8642694e2..3859006a94 100644
--- a/contrib/libs/lzma/liblzma/common/vli_encoder.c
+++ b/contrib/libs/lzma/liblzma/common/vli_encoder.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file vli_encoder.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"
diff --git a/contrib/libs/lzma/liblzma/common/vli_size.c b/contrib/libs/lzma/liblzma/common/vli_size.c
index ec1b4fa488..c8cb2ec10a 100644
--- a/contrib/libs/lzma/liblzma/common/vli_size.c
+++ b/contrib/libs/lzma/liblzma/common/vli_size.c
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file vli_size.c
@@ -5,9 +7,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#include "common.h"