Results 1 to 5 of 5

Thread: LZMA recompression

  1. #1
    Member
    Join Date
    Nov 2012
    Location
    UK
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    LZMA recompression

    Hi,

    Could someone explain to me why this file doesn't match the original compressed file when decompressed then recompressed with LZMA on default settings? The properties are set to default as far as I can see so I've no idea why they're different.

    Thanks

    Compressed file: removed
    Last edited by twisted89; 4th December 2012 at 17:36.

  2. #2
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    lzma is indeterministic algorithm, it doesn't gurantee that compressed data will be same for the same input data

  3. #3
    Member
    Join Date
    Nov 2012
    Location
    UK
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Ah right, thanks for the answer.

  4. #4
    Administrator Shelwien's Avatar
    Join Date
    May 2008
    Location
    Kharkov, Ukraine
    Posts
    3,134
    Thanks
    179
    Thanked 921 Times in 469 Posts
    to be specific, there're lots of parameters which affect compression:
    Code:
     -a{N}:  set compression mode - [0, 1], default: 1 (max)
     -d{N}:  set dictionary size - [12, 30], default: 23 (8MB)
     -fb{N}: set number of fast bytes - [5, 273], default: 128
     -mc{N}: set number of cycles for match finder
     -lc{N}: set number of literal context bits - [0, 8], default: 3
     -lp{N}: set number of literal pos bits - [0, 4], default: 0
     -pb{N}: set number of pos bits - [0, 4], default: 2
     -mf{MF_ID}: set Match Finder: [bt2, bt3, bt4, hc4], default: bt4
     -mt{N}: set number of CPU threads
    fortunately there's mostly one encoder implementation, but its still necessary to know all the parameter values used for encoding.
    lc/lp/pb can be detected with lzmarec, but there're still many others.

    Also note that .7z has some additional filters which can be applied before lzma compression, which adds even more parameters.

  5. #5
    Programmer Bulat Ziganshin's Avatar
    Join Date
    Mar 2007
    Location
    Uzbekistan
    Posts
    4,497
    Thanks
    733
    Thanked 659 Times in 354 Posts
    m/t lzma results may vary because one thread calculates probabilities used in another thread so it may update probs earlier or later. or may not vary. definitely m/t and s/t versions produce different results

Similar Threads

  1. Steganography for universal recompression of lossy formats
    By Shelwien in forum Data Compression
    Replies: 3
    Last Post: 7th November 2011, 18:05
  2. LZX recompression - proof of concept
    By schnaader in forum Data Compression
    Replies: 3
    Last Post: 29th March 2011, 14:22
  3. Format priority for recompression
    By Shelwien in forum Data Compression
    Replies: 22
    Last Post: 12th March 2011, 00:35
  4. filesharing with built-in recompression
    By Shelwien in forum Data Compression
    Replies: 8
    Last Post: 8th December 2009, 13:42
  5. Winzip v12.0 with JPG recompression & 7z support
    By maadjordan in forum Data Compression
    Replies: 3
    Last Post: 12th September 2008, 23:58

Posting Permissions

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