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.



7
8
9
# File 'lib/pdf/reader/filter/lzw.rb', line 7

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

Instance Method Details

#filter(data) ⇒ Object

Decode the specified data with the LZW compression algorithm



13
14
15
16
# File 'lib/pdf/reader/filter/lzw.rb', line 13

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