Release 1.2.2
diff --git a/BUILD.bazel b/BUILD.bazel
index 04d16b7..e6622ff 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -30,7 +30,7 @@
licenses(["notice"])
-SNAPPY_VERSION = (1, 1, 10)
+SNAPPY_VERSION = (1, 2, 2)
config_setting(
name = "windows",
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 55501fb..cd71a47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cmake_minimum_required(VERSION 3.10)
-project(Snappy VERSION 1.2.1 LANGUAGES C CXX)
+project(Snappy VERSION 1.2.2 LANGUAGES C CXX)
# C++ standard can be overridden when this is used as a sub-project.
if(NOT CMAKE_CXX_STANDARD)
diff --git a/MODULE.bazel b/MODULE.bazel
index 7b917ac..4f80d95 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -1,6 +1,6 @@
module(
name = "snappy",
- version = "1.2.1",
+ version = "1.2.2",
compatibility_level = 1,
)
diff --git a/NEWS b/NEWS
index 792a578..ef935ba 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,18 @@
+Snappy v1.2.2, Mar 26th 2025:
+
+ * We added a new compression level in v1.2.1 which compresses a bit
+ denser but slower. Decompression speed should be even faster with it.
+
+ * We fixed a very old issue of data corruption when compressed size
+ exceeds 4GB. This can happen when you compress data close to 4GB
+ and it's incompressible, for example, random data.
+
+ * Started to use minimum CMake 3.10 because older ones are not
+ planned to be supported.
+
+ * Various other small fixes and performance improvements (especially
+ for clang).
+
Snappy v1.1.10, Mar 8th 2023:
* Performance improvements
diff --git a/snappy.cc b/snappy.cc
index 7a8920f..8dc3713 100644
--- a/snappy.cc
+++ b/snappy.cc
@@ -1690,7 +1690,8 @@
#if __cplusplus >= 201402L
constexpr bool VerifyCalculateNeeded() {
for (int i = 0; i < 1; i++) {
- if (CalculateNeeded(i) != (char_table[i] >> 11) + 1) return false;
+ if (CalculateNeeded(i) != static_cast<uint32_t>((char_table[i] >> 11)) + 1)
+ return false;
}
return true;
}