Results 1 to 5 of 5

Thread: About filter

  1. #1
    Member
    Join Date
    Jan 2008
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hello all,

    I am curious about how does the filter work in a compressor?

    For instance, some compressors have the EXE filter for improving compression ratio for executable files. And some have the BMP filter for bmp files...etc.

    How the the filter work?

    Can somebody give a brief explaination?

    Thanks a lot!

  2. #2
    Tester
    Nania Francesco's Avatar
    Join Date
    May 2008
    Location
    Italy
    Posts
    1,565
    Thanks
    220
    Thanked 146 Times in 83 Posts
    Delta Encoding for BMP and Wave files!
    in this forum
    http://www.encode.ru/forums/index.ph...um=1&topic=575

  3. #3
    The Founder encode's Avatar
    Join Date
    May 2006
    Location
    Moscow, Russia
    Posts
    3,954
    Thanks
    359
    Thanked 332 Times in 131 Posts
    Quote Originally Posted by vcore
    Can somebody give a brief explaination?
    Filter aka Preprocessor works as follows:

    Compression:
    [Uncompressed Data] -> [Filter / Pre-Processor] -> [Compressor] -> [Compressed Data]

    Decompression:
    [Compressed Data] -> [Decompressor] -> [Filter / Post-Processor] -> [Decompressed Data]

    In other words, filter transforms the data into more compressible form. Usually the transformed data has the same or even larger size.
    The compressor even "dont knows" that it compresses a preprocessed data.

    For example, with EXE files, the filter translates the relative CALL/JMP instructions into absolute values.

    MM filter applies delta and other tricks.

    And so on...


  4. #4
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,134
    Thanks
    179
    Thanked 921 Times in 469 Posts
    > I am curious about how does the filter work in a compressor?
    > For instance, some compressors have the EXE filter for improving compression
    > ratio for executable files.

    Well, sometimes, like with x86 code, its possible to transform the
    original data into something better fitting the compressor's model.
    Eg. jump/call targets in x86 instructions are encoded as a difference
    between real target address and instruction's end address, so the
    5-byte calls to the same function at different locations are encoded
    by different byte sequences. But if you'd use a filter which
    adds current offset to 32bits following the E8/E9 prefix
    (and subtracts after decoding), the filtered data would suddenly
    become more compressible, with longer matches etc.
    http://compression.ru/sh/flt32.rar

    Also there're similar techniques for text preprocessing, see
    http://www.ii.uni.wroc.pl/~inikep/research/WRT/

    Basically the idea is that preprocessor/filter turns some specific
    correlations known from the file format into the form usable for
    "univeral" compressor.

    > And some have the BMP filter for bmp files...etc.
    > How the the filter work?

    Now that's kinda other thing. As bmp files are 2D tables, and
    universal compression methods are 1D-oriented, so nothing much
    could be done, though subtracting some estimation by neighbouring
    points might be of some help.

    So the correct solution is to write a custom context model for
    each specific format.

    Edit: well, two answers are better than one

  5. #5
    Member
    Join Date
    Jan 2008
    Posts
    33
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi, thanks very much, encode, Shelwien and Francesco!

Similar Threads

  1. disasm-based executable's filter
    By Bulat Ziganshin in forum Data Compression
    Replies: 17
    Last Post: 22nd March 2010, 16:14
  2. Need god PCM compressor/filter
    By SvenBent in forum Data Compression
    Replies: 10
    Last Post: 8th July 2008, 15:52
  3. Stand alone pcm dat preprocessor/filter
    By SvenBent in forum Data Compression
    Replies: 5
    Last Post: 15th May 2008, 15:36

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •