Class: ADSP::String
- Inherits:
-
Object
- Object
- ADSP::String
- Defined in:
- lib/adsp/string.rb
Overview
ADSP::String class.
Direct Known Subclasses
Constant Summary collapse
- Option =
Current option class.
ADSP::Option
- BUFFER_LENGTH_NAMES =
Current buffer length names. It is a part of decompressor options.
%i[destination_buffer_length].freeze
Class Method Summary collapse
-
.compress(source, options = {}) ⇒ Object
Compresses
sourcestring usingoptions. -
.decompress(source, options = {}) ⇒ Object
Decompresses
sourcestring usingoptions. -
.native_compress_string(source, options) ⇒ Object
Internal method for compressing
sourcestring usingoptions. -
.native_decompress_string(source, options) ⇒ Object
Internal method for decompressing
sourcestring usingoptions.
Class Method Details
.compress(source, options = {}) ⇒ Object
Compresses source string using options. Option: :destination_buffer_length destination buffer length. Returns compressed string.
21 22 23 24 25 26 27 |
# File 'lib/adsp/string.rb', line 21 def self.compress(source, = {}) Validation.validate_string source = self::Option. , BUFFER_LENGTH_NAMES native_compress_string source, end |
.decompress(source, options = {}) ⇒ Object
Decompresses source string using options. Option: :destination_buffer_length destination buffer length. Returns decompressed string.
41 42 43 44 45 46 47 |
# File 'lib/adsp/string.rb', line 41 def self.decompress(source, = {}) Validation.validate_string source = self::Option. , BUFFER_LENGTH_NAMES native_decompress_string source, end |
.native_compress_string(source, options) ⇒ Object
Internal method for compressing source string using options.
32 33 34 |
# File 'lib/adsp/string.rb', line 32 def self.native_compress_string(source, ) raise NotImplementedError end |
.native_decompress_string(source, options) ⇒ Object
Internal method for decompressing source string using options.
52 53 54 |
# File 'lib/adsp/string.rb', line 52 def self.native_decompress_string(source, ) raise NotImplementedError end |