1Compress::Stream::Zstd:U:sCeormpCroenstsroirb(u3t)ed PerClomDporceusmse:n:tSattrieoanm::Zstd::Compressor(3)
2
3
4

NAME

6       Compress::Stream::Zstd::Compressor - Zstd streaming compression
7

SYNOPSIS

9           use Compress::Stream::Zstd::Compressor qw(ZSTD_CSTREAM_IN_SIZE);
10
11           my $compressor = Compress::Stream::Zstd::Compressor->new($level);
12           while (read($fh, my $buffer, ZSTD_CSTREAM_IN_SIZE)) {
13               print $compressor->compress($buffer);
14           }
15           print $compressor->end;
16

DESCRIPTION

18       The Compress::Stream::Zstd::Compressor module provides a streaming
19       interface to the Zstd compressor.
20

METHODS

22   Compress::Stream::Zstd::Compressor->new([$level])
23       :Compress::Stream::Zstd::Compressor
24       Create an instance of Compress::Stream::Zstd::Compressor.
25
26   $compressor->init([$level]) :Undef
27       (re)init the compressor.
28
29   $compressor->compress($input) :Str
30       Consume input stream.
31
32   $compressor->flush() :Str
33       Flush whatever data remains within internal buffer.
34
35   $compressor->end() :Str
36       Instructs to finish a frame.
37
38   $compressor->set_parameter( PARAMETER => VALUE )
39       Sets one of the compressorXs internal parameters. PARAMETER is one of
40       the parameter constants listed below.
41

CONSTANTS

43   ZSTD_CSTREAM_IN_SIZE
44       Recommended size for input buffer.
45

PARAMETER CONSTANTS

47       The following may be given to "set_parameter()":
48
49       •   "ZSTD_c_windowLog"
50

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       Zstandard by Facebook, Inc.
83
84
85
86perl v5.36.0                      2022-07-C2o2mpress::Stream::Zstd::Compressor(3)
Impressum