Class: ADSP::Stream::Raw::NativeDecompressor
- Inherits:
-
Object
- Object
- ADSP::Stream::Raw::NativeDecompressor
- Defined in:
- lib/adsp/stream/raw/native_decompressor.rb
Overview
ADSP::Stream::Raw::NativeDecompressor class.
Instance Method Summary collapse
-
#close ⇒ Object
Closes decompressor and cleans up internal resources.
-
#initialize(options) ⇒ NativeDecompressor
constructor
Initializes native decompressor.
-
#read(source) ⇒ Object
Reads part of
source
string. -
#read_result ⇒ Object
Provides next part of unread result.
Constructor Details
#initialize(options) ⇒ NativeDecompressor
Initializes native decompressor. Option: :destination_buffer_length
destination buffer length.
15 16 17 |
# File 'lib/adsp/stream/raw/native_decompressor.rb', line 15 def initialize() raise NotImplementedError end |
Instance Method Details
#close ⇒ Object
Closes decompressor and cleans up internal resources. Raises UsedAfterCloseError
when used after close.
36 37 38 |
# File 'lib/adsp/stream/raw/native_decompressor.rb', line 36 def close raise NotImplementedError end |
#read(source) ⇒ Object
Reads part of source
string. Returns array of 2 values:
-
number of bytes read from
source
. -
boolean that can be named as “need more destination”.
User needs to call read_result
if “need more destination” is true.
24 25 26 |
# File 'lib/adsp/stream/raw/native_decompressor.rb', line 24 def read(source) raise NotImplementedError end |
#read_result ⇒ Object
Provides next part of unread result. Returns empty string if there is no unread result.
30 31 32 |
# File 'lib/adsp/stream/raw/native_decompressor.rb', line 30 def read_result raise NotImplementedError end |