WinRAR archive, not equal sizes

Discussion in 'Application Software' started by takuan, Aug 31, 2026 at 11:18.

  1. takuan

    takuan MDL Novice

    Apr 6, 2013
    27
    3
    0
    Hello all.

    I take an "old" archive, let's say 12 years old (from 2013 or 2014 or something like that), and extract it. I then take the exact same file, which I just extracted, and make a new archive. The new archive is exactly 2 bytes bigger than the old archive. The old archive is a .rar archive, and I am also of course making a new .rar archive.

    Can anyone explain this to me?

    I need a way to make the new archive identical to the old.

    For your information, I have used many different versions of WinRAR in order to check, if the version may have anything to do with it. I used v5.00, v5.01, v4.20 and many others, even the newest, but it seems that there is no difference. I used the English language ones. I also tried - just for fun - using Russian language WinRAR, but it seems that this makes no difference.
     
  2. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream
    Staff Member

    Dec 21, 2012
    8,198
    10,522
    270
    Did you do a comparison where exactly both differ?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. takuan

    takuan MDL Novice

    Apr 6, 2013
    27
    3
    0
    No, I did not do that. The length of the new archive file is simply 2 bytes longer.
    So I just did a comparison using HxD Hex Editor. It seems that they differ from the beginning and it continues.
    It seems that the "same" data is in there, but pushed one forward, and in other places just different.
    I mean, entire sections can be different. For example, the following is the original old archive in the beginning:

    Rar!�4ArŽ�…ßÖæŒ€€€�ãÌúob‰ÞÖæŒ€�€ÀÔ”’€� /}謀m�<

    This is the same place and length, but in the new archive:

    Rar!�ñ}ÿ·�†ßÖæŒ€€€�£Ú\c‰ÞÖæŒ€�€ÀÔ”’€� @/}謀m�

    Since it is the exact same file (extracted from the original old archive), they should be identical but are not.
     
  4. Carlos Detweiller

    Carlos Detweiller Emperor of Ice-Cream
    Staff Member

    Dec 21, 2012
    8,198
    10,522
    270
    Differences start in the headers, directly after the Magic Number. Rar had a huge number of versions, over multiple OS. I remember using RAR 1.50 for DOS.

    Multiple parameters are stored from the environment, like OS, version used, timestamps, used RAR format, compression methods, and even the source file system. So, re-creating a binary-identical archive might work under some conditions, but only in the same environment.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. takuan

    takuan MDL Novice

    Apr 6, 2013
    27
    3
    0
    I see. Thank you very much for explaining this to me.
    I guess this will not be possible then. Thank you for your time.
     
  6. sergiomontejo

    sergiomontejo MDL Junior Member

    Apr 10, 2023
    91
    104
    0
    Maybe because they are not exactly the same file. When you extract the file, it changes its last access date to your system's date.

    You could start with that, update the access date with pwsh.

    And then check the dictionary size used in the original 2013 or 2014 version.