sneakers@heimat.UUCP (Dan "Sneakers" Schein) (12/20/89)
[eat this ms line eater] Does anyone know of a magic number sequence for the "LHarc" archive files? Ive made several test files and it lookes like the first couple of bytes are never the same. In case you don't know what I mean, the magic number is the first X bytes of file that indicate the files type. For example Zoo files say "ZOO", Warp files say "Warp", and Arc files use "\x1a\x08". If you have any information, please post or e-mail it. Thanx in advance Sneakers -- ___ Dan "Sneakers" Schein //// BERKS AMIGA BBS Sneakers Computing //// You've tried the rest, now try 2455 McKinley Ave. ___ //// the BEST! 80 Megs of 100% AMIGA West Lawn, PA 19609 \\\\//// 24 hrs @ 215/678-7691 \\\/// sneakers%heimat@commodore.com (or) uunet!cbmvax!heimat!sneakers
lphillips@lpami.wimsey.bc.ca (Larry Phillips) (12/20/89)
In <10296.AA10296@heimat>, sneakers@heimat.UUCP (Dan "Sneakers" Schein) writes: >[eat this ms line eater] > > Does anyone know of a magic number sequence for the "LHarc" archive files? > Ive made several test files and it lookes like the first couple of bytes > are never the same. I just checked about 20 .lzh files with a handy little utility called dumpdiff, and they all share a common string in offset start+2, for 5 bytes. 00000000: 1C492D6C 68312D85 .I-lh1-. | 23832D6C 68312D26 #.-lh1-& ^^^^^^^^^^^ ^^^^^ ^^^^^^^^^^^ ^^^^^ hex ASCII hex ASCII -larry -- " All I ask of my body is that it carry around my head." - Thomas Alva Edison - +-----------------------------------------------------------------------+ | // Larry Phillips | | \X/ lphillips@lpami.wimsey.bc.ca -or- uunet!van-bc!lpami!lphillips | | COMPUSERVE: 76703,4322 -or- 76703.4322@compuserve.com | +-----------------------------------------------------------------------+
sneakers@heimat.UUCP (Dan "Sneakers" Schein) (12/23/89)
In Message <934@lpami.wimsey.bc.ca>, lphillips@lpami.wimsey.bc.ca (Larry Phillips) writes: |In <10296.AA10296@heimat>, sneakers@heimat.UUCP (Dan "Sneakers" Schein) writes: |> |> Does anyone know of a magic number sequence for the "LHarc" archive files? |> Ive made several test files and it lookes like the first couple of bytes |> are never the same. | |I just checked about 20 .lzh files with a handy little utility called dumpdiff, |and they all share a common string in offset start+2, for 5 bytes. | Larry I received this from Martin J. Laubach ---<CUT HERE>--- Format of file headers within .LZH archives: Byte 0: No. bytes in header - 2 (0 = end of file) 1: Checksum of remaining bytes (counted by byte 0) 2-6: ASCII compression type: '-lh0-' = no compression '-lh1-' = LHARC compression (presumably other valid types used by the separate LARC program?) 7-10: Comressed file size \ (low byte 11-14: Original file length / first) 15-16: File time \ (INT 21H, 17-18: File date / function 57H) 19-20: File attributes (INT 21H, function 43H) 21: No. bytes in path/file name (n) 22...: Path/file name (n bytes) 22+n: CRC-16 (2 bytes, optional; requires byte 0 - byte 21 = 22) 22+n = Header length, if no CRC (generated by ???) 24+n = Header length, if CRC Notes: (1) Above inferred by manual inspection and confirmed by disassembly of LHARC10E self-extraction code, except for bytes 19-20, which are not used by self-extraction code. (2) Maximum path/file name length = 233 bytes (235 bytes, if no CRC), given max. byte 0 count = 255 (3) CRC-16 polynomial identical to that used by .ARC archives. ---<CUT HERE>--- So I guess there really is no magic number like ARC, ZOO, or WARP. Guess im going to have to just be a bit more creative ;-) Merry Christmas to all! -- ___ Dan "Sneakers" Schein //// Father of a bouncing baby BOY! Sneakers Computing //// Stephan Maxwell Schein 2455 McKinley Ave. ___ //// Born Dec-21-89 at 9:43 am West Lawn, PA 19609 \\\\//// \\\/// sneakers%heimat@commodore.com (or) uunet!cbmvax!heimat!sneakers
mjl@alison.at (Martin J. Laubach) (12/29/89)
In Message <10332.AA10332@heimat>, sneakers@heimat.UUCP (Dan "Sneakers" Schein) wrote: > Larry I received this from Martin J. Laubach Oops, it seems I replied to the wrong person. Sorry for the inconvenience -- if there are any other questions, I've a bunch of files describing the LHArc thingy in more detail. > So I guess there really is no magic number like ARC, ZOO, or WARP. Guess im going to have to just be a bit more creative ;-) You still can use the "-lh?-" compression type identifier at offset 2. It's a pity that most compressor writers don't think that far to include some "signature" in the format (like Zoo). An exciting, successful, promising and surprising new year to you! mjl // Usenet: mjl@alison.at or ..uunet!mcsun!tuvie!alison!mjl \X/ Fido: 2:310/3.14
pete@i-core.UUCP (Pete Ashdown) (01/03/90)
Speaking of LHarc, does anyone have the Amiga source to its compression routines? I've got the IBM source, but since I am not fluent in 8088 or Japanese, it is pretty much useless to me. In the documentation to LHWarp, the author refers to the source as being PD (ie: I compiled under Lattice, LHArc is compiled under Manx. (infering the same source code was used)). If anyone has the Amiga LHArc source, I would appreciate it very much!