Class: PDF::Reader::Filter::Lzw

Inherits:
Object
  • Object
show all
Defined in:
lib/pdf/reader/filter/lzw.rb

Overview

implementation of the LZW stream filter

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Lzw

Returns a new instance of Lzw.



11
12
13
# File 'lib/pdf/reader/filter/lzw.rb', line 11

def initialize(options = {})
  @options = options
end

Instance Method Details

#filter(data) ⇒ Object

Decode the specified data with the LZW compression algorithm



17
18
19
20
# File 'lib/pdf/reader/filter/lzw.rb', line 17

def filter(data)
  data = PDF::Reader::LZW.decode(data)
  Depredict.new(@options).filter(data)
end