LZH file failure

yogender
2014-06-27
2014-08-30
  • yogender

    yogender - 2014-06-27

    If i create any .lzh or .lza file from bitzipper or IZArc software, 7zip says can't open as an archive on extraction.
    I did some small changes in source code for files to work. In LzhHandler.cpp file inside CInArchive::GetNextItem(..) function following is changed code,

    Byte header[256];
    const UInt32 kBasicPartSize = 22;
    RINOK(ReadBytes(header, kBasicPartSize, processedSize));
    if (processedSize != kBasicPartSize)
    return (startHeader[0] == 0 || (processedSize == 1 && header[0] == 0)) ? S_OK: S_FALSE;

    previous code was

    if (processedSize != kBasicPartSize)
    return (startHeader[0] == 0) ? S_OK: S_FALSE;

    is this change fine?

    and why had you commented item.IsLh1GroupMethod() part in CHandler::Extract() function (LzhHandler.cpp) ??

     
  • Igor Pavlov

    Igor Pavlov - 2014-06-27

    Check the problem with latest 7-Zip 9.34.
    If there is problem still, please attach some small examples of archives.

     
    Last edit: Igor Pavlov 2014-06-27
  • yogender

    yogender - 2014-06-29

    with latest 7zip 9.34 file is getting extracted properly.
    but it shows message of header error. warning : There are some data after the end of payload data.

     
  • yogender

    yogender - 2014-06-29

    i guess it is because of getnextfile returning failure.

     
  • Igor Pavlov

    Igor Pavlov - 2014-06-29

    So do you think, that
    10 00 00
    is correct end of lzh archive?
    Why do you think so?
    What program creates such archive (bitzipper or IZArc) and why?
    Can you ask them about that problem?

     
  • yogender

    yogender - 2014-06-29

    bit zipper and IZArc both create such archive. End of archive is not always 10 00 00, first byte i.e. 10 changes according to data for e.g. some times it is 40 00 00, 1B 00 00, .. but last two bytes are always zero.
    WinRar extracts them properly without any error. I'll ask them about the significance of last 3 bytes.
    i just randomly searched for tool which can create lzh archive. since, bit zipper's created archive was getting failed for extraction with 7z .. so i downloaded another i.e. IZArc but it also creates lzh archive in the similar fashion.

     
  • yogender

    yogender - 2014-07-01

    This file fails on extraction.
    unsupported compression.
    in 9.34 alpha also its failing.

    according to source code 7z only supports h0, h4, h5, h6, h7, z4 method.
    below file is of h1 method (these are present in 5 byte header for eg. -lh1- , 3th and 4th byte decides method).
    There is a fucntion IsLh1GroupMethod() but its call is commented.

    There are other methods also h2, h3, zs, z5.

     
    Last edit: yogender 2014-07-01
  • Igor Pavlov

    Igor Pavlov - 2014-07-01

    Now I'm not ready to work for -lh1- code.
    Maybe later I'll return to that problem.

     
  • yogender

    yogender - 2014-07-01

    ok thanks no problem.

     
  • Ashkan

    Ashkan - 2014-08-30

    I've got this message on rar files. Is this anything to be concerned about? Is there any data corruption?

     

Log in to post a comment.