Results 1 to 7 of 7

Thread: JPG decompression

  1. #1
    Member CompressMaster's Avatar
    Join Date
    Jun 2018
    Location
    Lovinobana, Slovakia
    Posts
    200
    Thanks
    59
    Thanked 15 Times in 15 Posts

    JPG decompression

    Hello users,

    I am looking for the most efficient JPG/JPEG decompressor. I know, of course, that JPGs "cannot be" losslessly compressed further due to big "randomness" (excluding PAQ´s algorithms). The same applied for decompression. But I´ve heard that it´s possible at least to certain treshold - for example with StuffIt. But, are there better approaches? Note that I don´t want to losslessly compress already compressed data, I want to DECOMPRESS it.

    Thanks.
    CompressMaster

  2. #2
    Member
    Join Date
    Feb 2015
    Location
    United Kingdom
    Posts
    177
    Thanks
    29
    Thanked 75 Times in 45 Posts
    Replacing the entropy coder is the fastest repacking method I can think of. Just stream the huffman codes and actively replace the symbols meaning with the range coded equivalent.

    But if you just want to dump the raw data within the jpeg then use this: http://mattmahoney.net/dc/jpg2dct.zip

  3. #3
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    4,008
    Thanks
    301
    Thanked 1,324 Times in 757 Posts
    What stuffit does is the same jpeg recompression as paq.
    At this point there're lots of jpeg recompression implementations, you'd have to test them all.
    For example, see http://packjpg.encode.su/?page_id=17 https://github.com/dropbox/lepton/releases https://encode.su/threads/1243-Open-...EG-compressors
    Lepton is probably fastest atm (with MT and AVX).
    My pjpg is also pretty fast, but buggy.

    Also, please define "efficient" and "decompression". It sounds like you want a lossless jpeg recompressor with fastest decoding,
    but I'm not 100% sure about it.
    There're also all kinds of optimized jpeg decoders unrelated to recompression (both for speed and comparison metrics).

  4. Thanks:

    xinix (30th April 2019)

  5. #4
    Member
    Join Date
    Jun 2015
    Location
    Switzerland
    Posts
    918
    Thanks
    254
    Thanked 327 Times in 200 Posts
    Quote Originally Posted by Shelwien View Post
    Lepton is probably fastest atm (with MT and AVX).
    https://github.com/google/brunsli is about 2.5x faster than lepton (single-threaded), but compresses 1 % worse.

  6. Thanks:

    Shelwien (29th April 2019)

  7. #5
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    4,008
    Thanks
    301
    Thanked 1,324 Times in 757 Posts
    Here I patched it to allow output filename and compiled for windows: http://nishi.dreamhosters.com/u/brunsli_v0.rar
    Seems to work.

    842468 A10.jpg
    680816 brunsli
    688273 lepton
    672236 lepton-slow

  8. #6
    Member CompressMaster's Avatar
    Join Date
    Jun 2018
    Location
    Lovinobana, Slovakia
    Posts
    200
    Thanks
    59
    Thanked 15 Times in 15 Posts
    By "efficient" I mean always the best compression ratio - i.e. the smallest size
    By "decompression" I mean something like ZIP - decompress file into original and then apply more sophisticated algorithm than default to UNCOMPRESSED data.

  9. #7
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    4,008
    Thanks
    301
    Thanked 1,324 Times in 757 Posts
    Here's my refactored version of Stirner's jpeg dumper (used in packjpg and lepton): http://nishi.dreamhosters.com/u/uncmpjpg_sh_012.rar
    It generates a file with jpeg data structures without entropy coding.
    But you won't be able to compress this data with a universal compression algorithm - at least not better than a specialized recompressor.

    Otherwise, paq8px currently provides the best compression for jpeg format.

    Alternatively, there's this speed-optimized version of paq model, with reduced compression (but still better than packjpg etc):
    http://nishi.dreamhosters.com/u/jojpeg_sh2.rar

Similar Threads

  1. JPG,GIF,MP3 to BMP, WAV
    By necros in forum Data Compression
    Replies: 8
    Last Post: 20th March 2016, 20:49
  2. Why does progressive helps compression so much in jpg's
    By SvenBent in forum Data Compression
    Replies: 5
    Last Post: 17th May 2014, 14:20
  3. JPG truecoloer to Grey no reencoding ?
    By SvenBent in forum The Off-Topic Lounge
    Replies: 7
    Last Post: 6th May 2014, 06:47
  4. lossy simplifier of a png bmp jpg
    By toi007 in forum The Off-Topic Lounge
    Replies: 7
    Last Post: 7th July 2012, 01:44
  5. JPG COMPRESSION
    By Bulat Ziganshin in forum Forum Archive
    Replies: 4
    Last Post: 8th May 2007, 15:49

Tags for this Thread

Posting Permissions

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