Class: ZSTDS::Stream::Raw::Compressor

Inherits:
ADSP::Stream::Raw::Compressor
  • Object
show all
Defined in:
lib/zstds/stream/raw/compressor.rb

Overview

ZSTDS::Stream::Raw::Compressor class.

Constant Summary collapse

NativeCompressor =

Current native compressor class.

Stream::NativeCompressor
Option =

Current option class.

ZSTDS::Option

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Compressor

Initializes compressor. Option: :destination_buffer_length destination buffer length. Option: :pledged_size source bytesize.



24
25
26
27
28
29
30
31
# File 'lib/zstds/stream/raw/compressor.rb', line 24

def initialize(options = {})
  options = Option.get_compressor_options options, BUFFER_LENGTH_NAMES

  pledged_size = options[:pledged_size]
  Validation.validate_not_negative_integer pledged_size unless pledged_size.nil?

  super options
end