Class: ZSTDS::String
- Inherits:
-
ADSP::String
- Object
- ADSP::String
- ZSTDS::String
- Defined in:
- lib/zstds/string.rb
Overview
ZSTDS::String class.
Constant Summary collapse
Class Method Summary collapse
-
.compress(source, options = {}) ⇒ Object
Compresses
source
string usingoptions
. -
.native_compress_string(*args) ⇒ Object
Bypasses native compress.
-
.native_decompress_string(*args) ⇒ Object
Bypasses native decompress.
Class Method Details
.compress(source, options = {}) ⇒ Object
Compresses source
string using options
. Option: :destination_buffer_length
destination buffer length. Option: :pledged_size
source bytesize. Returns compressed string.
20 21 22 23 24 25 26 27 28 |
# File 'lib/zstds/string.rb', line 20 def self.compress(source, = {}) Validation.validate_string source = Option. , BUFFER_LENGTH_NAMES [:pledged_size] = source.bytesize super source, end |
.native_compress_string(*args) ⇒ Object
Bypasses native compress.
31 32 33 |
# File 'lib/zstds/string.rb', line 31 def self.native_compress_string(*args) ZSTDS._native_compress_string(*args) end |
.native_decompress_string(*args) ⇒ Object
Bypasses native decompress.
36 37 38 |
# File 'lib/zstds/string.rb', line 36 def self.native_decompress_string(*args) ZSTDS._native_decompress_string(*args) end |