Class: ADSP::Stream::Raw::NativeDecompressor

Inherits:
Object
  • Object
show all
Defined in:
lib/adsp/stream/raw/native_decompressor.rb

Overview

ADSP::Stream::Raw::NativeDecompressor class.

Instance Method Summary collapse

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(options)
  raise NotImplementedError
end

Instance Method Details

#closeObject

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:

  1. number of bytes read from source.

  2. 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_resultObject

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