1Compress::Stream::Zstd(U3s)er Contributed Perl DocumentatCioomnpress::Stream::Zstd(3)
2
3
4

NAME

6       Compress::Stream::Zstd - Perl interface to the Zstd (Zstandard)
7       (de)compressor
8

NOTE

10       This module is a fork of Compress-Zstd
11       <https://github.com/spiritloose/Compress-Zstd>.  It contains a few
12       changes to make streaming compression/uncompression more robust.  The
13       only reason for this fork is to allow the module to work with
14       `IO-Compress-Zstd`.  The hope is that the changes made here can be
15       merged back upstream and this module can be retired.
16

SYNOPSIS

18           use Compress::Stream::Zstd;
19
20           my $compressed = compress($bytes);
21           my $decompressed = decompress($compressed);
22

DESCRIPTION

24       The Compress::Stream::Zstd module provides an interface to the Zstd
25       (de)compressor.
26

FUNCTIONS

28   compress($source [, $level])
29       Compresses the given buffer and returns the resulting bytes. The input
30       buffer can be either a scalar or a scalar reference.
31
32       On error undef is returned.
33
34   compress_mt($source, $num_threads [, $level])
35       Multi-threaded version of the "compress" function.
36
37       Note that this function uses experimental API of Zstandard.
38
39   decompress($source)
40   uncompress($source)
41       Decompresses the given buffer and returns the resulting bytes. The
42       input buffer can be either a scalar or a scalar reference.
43
44       On error (in case of corrupted data) undef is returned.
45

CONSTANTS

47   ZSTD_VERSION_NUMBER
48   ZSTD_VERSION_STRING
49   ZSTD_MAX_CLEVEL
50   ZSTD_MIN_CLEVEL

SEE ALSO

52       <http://www.zstd.net/>
53

LICENSE

55           Copyright (c) 2016, Jiro Nishiguchi
56           All rights reserved.
57
58           Redistribution and use in source and binary forms, with or without modification,
59           are permitted provided that the following conditions are met:
60
61           1. Redistributions of source code must retain the above copyright notice, this
62           list of conditions and the following disclaimer.
63
64           2. Redistributions in binary form must reproduce the above copyright notice,
65           this list of conditions and the following disclaimer in the documentation
66           and/or other materials provided with the distribution.
67
68           THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
69           ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
70           WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
71           DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
72           ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
73           (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
74           LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
75           ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
76           (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
77           SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
78

AUTHOR

80       Jiro Nishiguchi <jiro@cpan.org>
81
82       Some streaming enhancement by Paul Marquess  <pmqs@cpan.org>
83
84       Zstandard by Facebook, Inc.
85
86
87
88perl v5.36.0                      2022-07-22         Compress::Stream::Zstd(3)
Impressum