Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Archived

This module is no longer maintained.

The PDF-specific implementation is now maintained internally by pdfcpu.

Existing tagged versions remain available for reproducible builds. There is no public drop-in replacement in pdfcpu.

Note

Background

  • PDF's LZWDecode filter comes with the optional parameter EarlyChange.
  • The type of this parameter is int and the defined values are 0 and 1.
  • The default value is 1.

This parameter implies two variants of lzw. (See the PDF spec).

compress/lzw:

  • the algorithm implied by EarlyChange value 1
  • provides both Reader and Writer.

x/image/tiff/lzw:

  • the algorithm implied by EarlyChange value 0
  • provides a Reader, lacks a Writer

In addition PDF expects a leading clear_table marker right at the beginning which is not something compress/lzw takes into account.

There are numerous PDF Writers out there and for arbitrary PDF files using the LZWDecode filter the following can be observed:

  • Some PDF writers do not write the EOD (end of data) marker.
  • Some PDF writers do not write the final bits after the EOD marker.

Goal

An extended version of compress/lzw with reliable support for GIF, TIFF and PDF.

About

An extended version of compress/lzw.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages