Skip to content

Commit 527741c

Browse files
committed
refactor: ZstdContext -> Zstd\(Un)Compress\Context
1 parent 8dac0f1 commit 527741c

File tree

6 files changed

+257
-78
lines changed

6 files changed

+257
-78
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ Returns the decompressed data or FALSE if an error occurred.
218218

219219
#### Description
220220

221-
resource **zstd\_compress\_init** ( [ int _$level_ = ZSTD_COMPRESS_LEVEL_DEFAULT ] )
221+
Zstd\\Compress\\Context **zstd\_compress\_init** ( [ int _$level_ = ZSTD_COMPRESS_LEVEL_DEFAULT ] )
222222

223223
Initialize an incremental compress context
224224

@@ -237,7 +237,7 @@ Returns a zstd context instance on success, or FALSE on failure
237237

238238
#### Description
239239

240-
string **zstd\_compress\_add** ( ZstdContext _$context_, string _$data_ [, bool _$end_ = false ] )
240+
string **zstd\_compress\_add** ( Zstd\\Compress\\Context _$context_, string _$data_ [, bool _$end_ = false ] )
241241

242242
Incrementally compress data
243243

@@ -264,7 +264,7 @@ Returns a chunk of compressed data, or FALSE on failure.
264264

265265
#### Description
266266

267-
resource **zstd\_uncompress\_init** ( void )
267+
Zstd\\UnCompress\\Context **zstd\_uncompress\_init** ( void )
268268

269269
Initialize an incremental uncompress context
270270

@@ -277,7 +277,7 @@ Returns a zstd context instance on success, or FALSE on failure
277277

278278
#### Description
279279

280-
string **zstd\_uncompress\_add** ( ZstdContext _$context_, string _$data_ )
280+
string **zstd\_uncompress\_add** ( Zstd\\UnCompress\\Context _$context_, string _$data_ )
281281

282282
Incrementally uncompress data
283283

php_zstd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ extern zend_module_entry zstd_module_entry;
4242
#include "TSRM.h"
4343
#endif
4444

45-
#if PHP_VERSION_ID >= 80000
4645
typedef struct _php_zstd_context php_zstd_context;
4746

47+
#if PHP_VERSION_ID >= 80000
4848
ZEND_BEGIN_MODULE_GLOBALS(zstd)
4949
zend_long output_compression;
5050
zend_long output_compression_default;

tests/inc_comp.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,19 @@ foreach ([128, 512, 1024] as $size) {
2525
===Done===
2626
--EXPECTF--
2727
int(128)
28-
object(ZstdContext)#%d (0) {
28+
object(Zstd\Compress\Context)#%d (0) {
2929
}
3030
int(%d)
3131
bool(true)
3232
bool(true)
3333
int(512)
34-
object(ZstdContext)#%d (0) {
34+
object(Zstd\Compress\Context)#%d (0) {
3535
}
3636
int(%d)
3737
bool(true)
3838
bool(true)
3939
int(1024)
40-
object(ZstdContext)#%d (0) {
40+
object(Zstd\Compress\Context)#%d (0) {
4141
}
4242
int(%d)
4343
bool(true)

tests/inc_decomp.phpt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ foreach ([128, 512, 1024] as $size) {
2525
===Done===
2626
--EXPECTF--
2727
int(128)
28-
object(ZstdContext)#%d (0) {
28+
object(Zstd\UnCompress\Context)#%d (0) {
2929
}
3030
bool(true)
3131
int(512)
32-
object(ZstdContext)#%d (0) {
32+
object(Zstd\UnCompress\Context)#%d (0) {
3333
}
3434
bool(true)
3535
int(1024)
36-
object(ZstdContext)#%d (0) {
36+
object(Zstd\UnCompress\Context)#%d (0) {
3737
}
3838
bool(true)
3939
===Done===

0 commit comments

Comments
 (0)