Precomp v0.3.3

  • Follow


Hi!

Precomp is a command-line file precompressor. It decompresses deflate/
zLib streams in files (for example PDF, SWF, ZIP, JAR, PNG) and
ensures they can be recompressed bit-to-bit-identical.
The output file is larger, but can usually be compressed better than
the original file with good compressors like UHArc or PAQ. PDF files,
for example, usually shrink to 25-50% of their original size.

A new version (0.3.3) of Precomp is out. New features:

- Added JPG compression using packJPG by Matthias Stirner.
  Have a look at http://www.elektronik.htw-aalen.de/packJPG for more
information about packJPG.
- Speeded up slow mode.
- Fixed ignore list.

Have a look at http://schnaader.info

Greetings,
  Christian "schnaader" Schneider
---
http://schnaader.info
Damn kids. They're all alike.

0
Reply schnaader (10) 7/16/2007 5:31:55 PM

On Jul 16, 1:31 pm, schnaader <schnaa...@gmx.de> wrote:
> Hi!
>
> Precomp is a command-line file precompressor. It decompresses deflate/
> zLib streams in files (for example PDF, SWF, ZIP, JAR, PNG) and
> ensures they can be recompressed bit-to-bit-identical.
> The output file is larger, but can usually be compressed better than
> the original file with good compressors like UHArc or PAQ. PDF files,
> for example, usually shrink to 25-50% of their original size.

What does this do that "pdftk in.pdf uncompress output out.pdf"
doesn't do?

0
Reply rpresser 7/17/2007 7:48:45 PM


> What does this do that "pdftk in.pdf uncompress output out.pdf"
> doesn't do?

It ensures that in.pdf can be restored _bit-to-bit-identical_ again.
Try "pdftk in.pdf output out.pdf uncompress" and "pdftk out.pdf output
in2.pdf compress" afterwards. In most cases, in.pdf and in2.pdf will
now differ and in.pdf can't be restored losslessy (although most or
all of the content will be the same).

Another difference for the new version 0.3.3 is the recompression of
JPEG images which shrinks JPGs to about 75% of their original size
without losing quality.

So in most cases, pdftk does the same, but Precomp ensures
restorability of the original file which makes it a nice tool to
archive PDF files "as they are" and be completely sure they'll stay
the same.
The main application is lossless compression, of course, where PDF
files usually don't compress good. So, for example, compressing a PDF
file with WinZip or WinRar won't shrink it much. But using Precomp
first and then compressing the resulting file will result in a much
smaller archive (usually around 50% of the original PDF size) and the
PDF can be restored by reverting the process.

Greetings,
  Christian "schnaader" Schneider
---
http://schnaader.info
Damn kids. They're all alike.

0
Reply schnaader 7/19/2007 11:31:04 PM

On Jul 19, 7:31 pm, schnaader <schnaa...@gmx.de> wrote:
> > What does this do that "pdftk in.pdf uncompress output out.pdf"
> > doesn't do?
>
> It ensures that in.pdf can be restored _bit-to-bit-identical_ again.
> Try "pdftk in.pdf output out.pdf uncompress" and "pdftk out.pdf output
> in2.pdf compress" afterwards. In most cases, in.pdf and in2.pdf will
> now differ and in.pdf can't be restored losslessy (although most or
> all of the content will be the same).
>
> Another difference for the new version 0.3.3 is the recompression of
> JPEG images which shrinks JPGs to about 75% of their original size
> without losing quality.
>

You're claiming that when no JPEG is involved, pdftk can't reproduce
the original?


0
Reply rpresser 7/20/2007 9:52:05 PM

> You're claiming that when no JPEG is involved, pdftk can't reproduce
> the original?

Regardless of JPEGs involved, pdftk is only able to reproduce the PDF
_losslessy_ (bit-to-bit identical, so same filesize and exactly same
content bit for bit, byte for byte) in some cases, for example if the
PDF was created with pdftk.
However, the content (the text, images and layout of the PDF) is still
the same and nothing really gets lost, but the internal structure of
the PDF is changed and optimized.
When using Precomp, this internal structure stays the same.

For example, take FlashMX.pdf from www.maximumcompression.com:
Original size is 4,5 MB.
Both Precomp and pdftk decompress it to 26,9 MB.

Now, we re-/uncompress with Precomp and pdftk:
Precomp restores the original file, getting exactly the same filesize
and restoring the original file (4,5 MB)
pdftk optimizes the file to 3,8 MB. Viewing it with some PDF viewer,
the file looks the same, but you won't be able to restore the original
4,5 MB file.

0
Reply schnaader 7/20/2007 11:54:23 PM

4 Replies
114 Views

(page loaded in 0.061 seconds)

Similiar Articles:




7/9/2012 7:52:21 PM


Reply: