class ZSTDS::String

ZSTDS::String class.

Constants

Option

ZSTDS::Option module.

Public Class Methods

compress(source, options = {}) click to toggle source

Compresses source string using options. Option: :destination_buffer_length destination buffer length. Option: :pledged_size source bytesize. Returns compressed string.

Calls superclass method
# File lib/zstds/string.rb, line 20
def self.compress(source, options = {})
  Validation.validate_string source

  options = Option.get_compressor_options options, BUFFER_LENGTH_NAMES

  options[:pledged_size] = source.bytesize

  super source, options
end
native_compress_string(*args) click to toggle source

Bypasses native compress.

# File lib/zstds/string.rb, line 31
def self.native_compress_string(*args)
  ZSTDS._native_compress_string(*args)
end
native_decompress_string(*args) click to toggle source

Bypasses native decompress.

# File lib/zstds/string.rb, line 36
def self.native_decompress_string(*args)
  ZSTDS._native_decompress_string(*args)
end