https://github.com/gabriel-darbord/pharo-zstd
Pharo FFI bindings for Zstd (Zstandard)
https://github.com/gabriel-darbord/pharo-zstd
pharo zstandard zstd
Last synced: about 1 year ago
JSON representation
Pharo FFI bindings for Zstd (Zstandard)
- Host: GitHub
- URL: https://github.com/gabriel-darbord/pharo-zstd
- Owner: Gabriel-Darbord
- License: mit
- Created: 2025-03-28T22:59:36.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-28T23:21:28.000Z (about 1 year ago)
- Last Synced: 2025-03-29T00:20:27.384Z (about 1 year ago)
- Topics: pharo, zstandard, zstd
- Language: Smalltalk
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Pharo FFI bindings for [Zstandard](https://github.com/facebook/zstd).
## Installing
```st
Metacello new
githubUser: 'Gabriel-Darbord' project: 'pharo-zstd' commitish: 'main' path: 'src';
baseline: 'LibZstd';
load
```
## Usage
```st
"Let's make a file to play with"
src := 'tmp.txt' asFileReference ensureCreateFile.
src writeStreamDo: [ :s | s truncate nextPutAll: String loremIpsum ].
"Compress then uncompress it"
zstd := LibZstd uniqueInstance.
zstd compressFile: src into: 'tmp.zstd'.
zstd decompressFile: 'tmp.zstd' into: 'tmp.zstd.txt'.
"Should be the truth"
src contents = 'tmp.zstd.txt' asFileReference contents.
```