summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--88.patch25
-rw-r--r--PHPINFO6
-rw-r--r--REFLECTION218
-rw-r--r--php-zstd.spec14
4 files changed, 182 insertions, 81 deletions
diff --git a/88.patch b/88.patch
deleted file mode 100644
index 8ff964a..0000000
--- a/88.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 96d5dcea944a188e9a388bf19ed81ee41f1a990c Mon Sep 17 00:00:00 2001
-From: Remi Collet <remi@remirepo.net>
-Date: Wed, 30 Jul 2025 12:06:59 +0200
-Subject: [PATCH] use Zend/zend_smart_string.h
-
----
- zstd.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/zstd.c b/zstd.c
-index 5479ba5..8ad068f 100644
---- a/zstd.c
-+++ b/zstd.c
-@@ -30,7 +30,11 @@
- #include <php_ini.h>
- #include <ext/standard/file.h>
- #include <ext/standard/info.h>
-+#if PHP_VERSION_ID < 70200
- #include <ext/standard/php_smart_string.h>
-+#else
-+#include "Zend/zend_smart_string.h"
-+#endif
- #if defined(HAVE_APCU_SUPPORT)
- #include <ext/standard/php_var.h>
- #include <ext/apcu/apc_serializer.h>
diff --git a/PHPINFO b/PHPINFO
index b89029b..f19e2cb 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,11 +2,11 @@
zstd
Zstd support => enabled
-Extension Version => 0.14.0
-Interface Version => 1.5.6
+Extension Version => 0.15.0
+Interface Version => 1.5.7
APCu serializer ABI => 0
Directive => Local Value => Master Value
zstd.output_compression => Off => Off
-zstd.output_compression_level => -1 => -1
+zstd.output_compression_level => 3 => 3
zstd.output_compression_dict => no value => no value
diff --git a/REFLECTION b/REFLECTION
index d6b83f4..f81548c 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #114 zstd version 0.14.0 ] {
+Extension [ <persistent> extension #129 zstd version 0.15.0 ] {
- Dependencies {
Dependency [ apcu (Optional) ]
@@ -9,7 +9,7 @@ Extension [ <persistent> extension #114 zstd version 0.14.0 ] {
Current = '0'
}
Entry [ zstd.output_compression_level <ALL> ]
- Current = '-1'
+ Current = '3'
}
Entry [ zstd.output_compression_dict <ALL> ]
Current = ''
@@ -20,136 +20,224 @@ Extension [ <persistent> extension #114 zstd version 0.14.0 ] {
Constant [ int ZSTD_COMPRESS_LEVEL_MIN ] { 1 }
Constant [ int ZSTD_COMPRESS_LEVEL_MAX ] { 22 }
Constant [ int ZSTD_COMPRESS_LEVEL_DEFAULT ] { 3 }
- Constant [ int LIBZSTD_VERSION_NUMBER ] { 10506 }
- Constant [ string LIBZSTD_VERSION_STRING ] { 1.5.6 }
+ Constant [ int ZSTD_VERSION_NUMBER ] { 10507 }
+ Constant [ string ZSTD_VERSION_TEXT ] { 1.5.7 }
}
- Functions {
Function [ <internal:zstd> function zstd_compress ] {
- - Parameters [2] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <optional> $level = <default> ]
+ - Parameters [3] {
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <optional> int $level = ZSTD_COMPRESS_LEVEL_DEFAULT ]
+ Parameter #2 [ <optional> ?string $dict = null ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function zstd_uncompress ] {
- - Parameters [1] {
- Parameter #0 [ <required> $data ]
+ - Parameters [2] {
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <optional> ?string $dict = null ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function zstd_decompress ] {
- - Parameters [1] {
- Parameter #0 [ <required> $data ]
+ - Parameters [2] {
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <optional> ?string $dict = null ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function zstd_compress_dict ] {
- Parameters [3] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
- Parameter #2 [ <optional> $level = <default> ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
+ Parameter #2 [ <optional> int $level = ZSTD_COMPRESS_LEVEL_DEFAULT ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function zstd_uncompress_dict ] {
- Parameters [2] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function zstd_compress_usingcdict ] {
- Parameters [3] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
- Parameter #2 [ <optional> $level = <default> ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
+ Parameter #2 [ <optional> int $level = ZSTD_COMPRESS_LEVEL_DEFAULT ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function zstd_decompress_dict ] {
- Parameters [2] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function zstd_uncompress_usingcdict ] {
- Parameters [2] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function zstd_decompress_usingcdict ] {
- Parameters [2] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
}
+ - Return [ string|false ]
}
- Function [ <internal:zstd> function Zstd\compress ] {
+ Function [ <internal:zstd> function zstd_compress_init ] {
- Parameters [2] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <optional> $level = <default> ]
+ Parameter #0 [ <optional> int $level = ZSTD_COMPRESS_LEVEL_DEFAULT ]
+ Parameter #1 [ <optional> ?string $dict = null ]
}
+ - Return [ Zstd\Compress\Context|false ]
}
- Function [ <internal:zstd> function Zstd\uncompress ] {
+ Function [ <internal:zstd> function zstd_compress_add ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <required> Zstd\Compress\Context $context ]
+ Parameter #1 [ <required> string $data ]
+ Parameter #2 [ <optional> bool $end = false ]
+ }
+ - Return [ string|false ]
+ }
+ Function [ <internal:zstd> function zstd_uncompress_init ] {
- Parameters [1] {
- Parameter #0 [ <required> $data ]
+ Parameter #0 [ <optional> ?string $dict = null ]
+ }
+ - Return [ Zstd\UnCompress\Context|false ]
+ }
+ Function [ <internal:zstd> function zstd_uncompress_add ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> Zstd\UnCompress\Context $context ]
+ Parameter #1 [ <required> string $data ]
}
+ - Return [ string|false ]
+ }
+ Function [ <internal:zstd> function Zstd\compress ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <optional> int $level = ZSTD_COMPRESS_LEVEL_DEFAULT ]
+ Parameter #2 [ <optional> ?string $dict = null ]
+ }
+ - Return [ string|false ]
+ }
+ Function [ <internal:zstd> function Zstd\uncompress ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <optional> ?string $dict = null ]
+ }
+ - Return [ string|false ]
}
Function [ <internal:zstd> function Zstd\decompress ] {
- - Parameters [1] {
- Parameter #0 [ <required> $data ]
+ - Parameters [2] {
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <optional> ?string $dict = null ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function Zstd\compress_dict ] {
- Parameters [3] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
- Parameter #2 [ <optional> $level = <default> ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
+ Parameter #2 [ <optional> int $level = ZSTD_COMPRESS_LEVEL_DEFAULT ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function Zstd\compress_usingcdict ] {
- Parameters [3] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
- Parameter #2 [ <optional> $level = <default> ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
+ Parameter #2 [ <optional> int $level = ZSTD_COMPRESS_LEVEL_DEFAULT ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function Zstd\uncompress_dict ] {
- Parameters [2] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function Zstd\decompress_dict ] {
- Parameters [2] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function Zstd\uncompress_usingcdict ] {
- Parameters [2] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function Zstd\decompress_usingcdict ] {
- Parameters [2] {
- Parameter #0 [ <required> $data ]
- Parameter #1 [ <required> $dictBuffer ]
+ Parameter #0 [ <required> string $data ]
+ Parameter #1 [ <required> string $dict ]
+ }
+ - Return [ string|false ]
+ }
+ Function [ <internal:zstd> function Zstd\compress_init ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <optional> int $level = ZSTD_COMPRESS_LEVEL_DEFAULT ]
+ Parameter #1 [ <optional> ?string $dict = null ]
+ }
+ - Return [ Zstd\Compress\Context|false ]
+ }
+ Function [ <internal:zstd> function Zstd\compress_add ] {
+
+ - Parameters [3] {
+ Parameter #0 [ <required> Zstd\Compress\Context $context ]
+ Parameter #1 [ <required> string $data ]
+ Parameter #2 [ <optional> bool $end = false ]
+ }
+ - Return [ string|false ]
+ }
+ Function [ <internal:zstd> function Zstd\uncompress_init ] {
+
+ - Parameters [1] {
+ Parameter #0 [ <optional> ?string $dict = null ]
+ }
+ - Return [ Zstd\UnCompress\Context|false ]
+ }
+ Function [ <internal:zstd> function Zstd\uncompress_add ] {
+
+ - Parameters [2] {
+ Parameter #0 [ <required> Zstd\UnCompress\Context $context ]
+ Parameter #1 [ <required> string $data ]
}
+ - Return [ string|false ]
}
Function [ <internal:zstd> function ob_zstd_handler ] {
@@ -160,5 +248,43 @@ Extension [ <persistent> extension #114 zstd version 0.14.0 ] {
- Return [ string|false ]
}
}
+
+ - Classes [2] {
+ Class [ <internal:zstd> final class Zstd\Compress\Context ] {
+
+ - Constants [0] {
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [0] {
+ }
+
+ - Methods [0] {
+ }
+ }
+
+ Class [ <internal:zstd> final class Zstd\UnCompress\Context ] {
+
+ - Constants [0] {
+ }
+
+ - Static properties [0] {
+ }
+
+ - Static methods [0] {
+ }
+
+ - Properties [0] {
+ }
+
+ - Methods [0] {
+ }
+ }
+ }
}
diff --git a/php-zstd.spec b/php-zstd.spec
index ea26c29..cae5e43 100644
--- a/php-zstd.spec
+++ b/php-zstd.spec
@@ -26,8 +26,8 @@
Summary: Zstandard extension
Name: %{?scl_prefix}php-%{pecl_name}
-Version: 0.14.0
-Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Version: 0.15.0
+Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
%if %{with libzstd}
License: MIT
%else
@@ -37,8 +37,6 @@ License: MIT AND BSD-3-Clause
URL: https://pecl.php.net/package/%{pecl_name}
Source0: https://pecl.php.net/get/%{sources}.tgz
-Patch0: 88.patch
-
BuildRequires: %{?dtsprefix}gcc
BuildRequires: %{?scl_prefix}php-devel >= 7.0
%if %{with apcu}
@@ -86,8 +84,6 @@ These are the files needed to compile programs using %{name}.
sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml
cd %{sources}
-%patch -P0 -p1 -b .pr88
-
%if %{with libzstd}
# Use the system library
rm -r zstd
@@ -116,7 +112,7 @@ extension = %{pecl_name}.so
; Configuration
;zstd.output_compression = Off
-;zstd.output_compression_level = -1
+;zstd.output_compression_level = 3
;zstd.output_compression_dict =
EOF
@@ -249,6 +245,10 @@ TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
%changelog
+* Wed Aug 13 2025 Remi Collet <remi@remirepo.net> - 0.15.0-1
+- update to 0.15.0
+- drop patch merged upstream
+
* Wed Jul 30 2025 Remi Collet <remi@remirepo.net> - 0.14.0-2
- fix for PHP 8.5.0alpha3 using patch from
https://github.com/kjdev/php-ext-zstd/pull/88