We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b59a10 commit 7aa7111Copy full SHA for 7aa7111
src/main/php/com/mongodb/io/Zstd.class.php
@@ -0,0 +1,19 @@
1
+<?php namespace com\mongodb\io;
2
+
3
+class Zstd extends Compressor {
4
+ public $id= 2;
5
+ public $level;
6
7
+ /** @param int $level */
8
+ public function __construct($level= -1) {
9
+ $this->level= $level;
10
+ }
11
12
+ public function compress($data) {
13
+ return zstd_compress($data, $this->level);
14
15
16
+ public function decompress($compressed) {
17
+ return zstd_uncompress($compressed);
18
19
+}
0 commit comments