Method: PDF::Reader::Filter::Flate#filter
- Defined in:
- lib/pdf/reader/filter/flate.rb
#filter(data) ⇒ Object
Decode the specified data with the Zlib compression algorithm : (String) -> String
24 25 26 27 28 29 30 31 32 |
# File 'lib/pdf/reader/filter/flate.rb', line 24 def filter(data) deflated = zlib_inflate(data) || zlib_inflate(data[0, data.bytesize-1]) if deflated.nil? raise MalformedPDFError, "Error while inflating a compressed stream (no suitable inflation algorithm found)" end Depredict.new(@options).filter(deflated) end |