๐ Major Features
- Incremental Compression: Added zstd_(un)compress_init() and zstd_(un)compress_add() functions for streaming compression
- 227ee4b Add incremental zstd_(un)compress_init() and zstd_(un)compress_add()
- f9f707c refactor: zstd_compress_init() using php_zstd_context_create_compress()
- d655ae2 refactor: zstd_compress_add() to use zend_string for input parameter
- a7d5961 refactor: zstd_uncompress_init() using php_zstd_context_create_decompress()
- bfca581 refactor: zstd_uncompress_add() to use zend_string for input parameter
- ZstdContext Classes: Introduced Zstd\Compress\Context and Zstd\Uncompress\Context classes for object-oriented streaming
- Dictionary Support: Added dictionary parameter to compress and uncompress functions
- Named Arguments: Support for PHP 8.0+ named arguments
๐ Updates
- Zstd Library: Updated to zstd 1.5.7
- Constants Unification: Renamed constants for consistency:
- f008254 refactor: rename constant LIBZSTD_VERSION_NUMBER -> ZSTD_VERSION_NUMBER
- c93ac2e refactor: rename constant LIBZSTD_VERSION_STRING -> ZSTD_VERSION_STRING
- 67222e3 refactor: replace all instances of DEFAULT_COMPRESS_LEVEL with ZSTD_CLEVEL_DEFAULT for consistency
- 214a63f refactor: change default zstd.output_compression_level
๐งช Experimental Features
- DCZ Support: Experimental compression dictionary transport support in output handler
๐ง Technical Improvements
- Refactored internal compression/decompression to use stream-based approach with php_zstd_context{}
- 6a88aea refactor: extract initialization logic into php_zstd_context_init()
- 7415731 change: zstd_compress() to stream-based using php_zstd_context{}
- 2c02139 change: zstd_compress_dict() to stream-based using php_zstd_context{}
- 986e054 change: zstd_uncompress() to stream-based using php_zstd_context{}
- d0e0806 change: zstd_uncompress_dict() to stream-based using php_zstd_context{}
- 1a92e55 refactor: change php_zstd_stream_data{} to use ctx of php_zstd_context{}
- Enhanced output handler with dictionary support
- Improved error handling and memory management
๐ Bug Fixes
- Fixed streaming compressed data with zstd_uncompress_dict()
๐ Documentation & Testing
- Updated README.md with new features and minimum libzstd version requirements
- Added comprehensive tests for new functionality
- Updated stub files for better IDE support
๐จ Build & CI
- Enhanced Windows build process with appropriate toolset selection
- Added binary attributes for zstd and dict files in gitattributes
- 4cc370f chore: add binary attributes for zstd and dict files in gitattributes
- Updated CI workflows with proper permissions
- 19f9cbc chore(.github/workflows): add permissions
Full Changelog: 0.14.0+pie...0.15.0