Welcome, Guest. Please login or register.

Author Topic: 7zip vs. lha  (Read 3235 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline ChaosLordTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
7zip vs. lha
« on: September 29, 2011, 05:28:17 PM »
I had this problem last week but I forgot to paste my notes to the forum.

I am backing up my Amiga hard drive by making lha archives of each partition and then copying over Ethernet to my slave bgcpc.


 Original was:           555,403,364 bytes  42,727 files  1549 dirs 1152925 blocks used
 I lhaed the files and copied over to pc
 After 7zip extract was: 552,818,263 bytes  42,731 files  1534 folders

Ok I can explain that the dirs went down from 1549 to 1534 by assuming that 7zip prob has the same bug that ALL GUI lha archivers have: They never decompress empty dirs!  GRRRRRR

But the number of FILES went UP.  7zip created me 4 new files that I never had b4.  Wow!  I wonder if it can write code for me too?

While I was unzipping, 7zip produced from very bizarre errors: it kept extracting nonexistant files with the same name as the archive.  These files were around 700K each.  The REAL files were smaller and had real, normal names and were associated with A500 TC Jospels/Tools/ (Jospels is where my bro put his gfx)
So it did this 4 times.  I thought since 4 files overwrote each other that I would be MISSING 4 files, not GAIN 4 files.  Man this is weird!!!!

Like if I named the archive blah.lha then it would extra 4 files named blah.  So I renamed the archive to a.lha then it extracted 4 files named a.  This just totally blew my mind.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline LaserBack

  • Sr. Member
  • ****
  • Join Date: Mar 2007
  • Posts: 338
    • Show only replies by LaserBack
Re: 7zip vs. lha
« Reply #1 on: September 29, 2011, 06:29:08 PM »
Quote from: ChaosLord;661869
I had this problem last week but I forgot to paste my notes to the forum.

I am backing up my Amiga hard drive by making lha archives of each partition and then copying over Ethernet to my slave bgcpc.


 Original was:           555,403,364 bytes  42,727 files  1549 dirs 1152925 blocks used
 I lhaed the files and copied over to pc
 After 7zip extract was: 552,818,263 bytes  42,731 files  1534 folders

Ok I can explain that the dirs went down from 1549 to 1534 by assuming that 7zip prob has the same bug that ALL GUI lha archivers have: They never decompress empty dirs!  GRRRRRR

But the number of FILES went UP.  7zip created me 4 new files that I never had b4.  Wow!  I wonder if it can write code for me too?

While I was unzipping, 7zip produced from very bizarre errors: it kept extracting nonexistant files with the same name as the archive.  These files were around 700K each.  The REAL files were smaller and had real, normal names and were associated with A500 TC Jospels/Tools/ (Jospels is where my bro put his gfx)
So it did this 4 times.  I thought since 4 files overwrote each other that I would be MISSING 4 files, not GAIN 4 files.  Man this is weird!!!!

Like if I named the archive blah.lha then it would extra 4 files named blah.  So I renamed the archive to a.lha then it extracted 4 files named a.  This just totally blew my mind.


do not use 7zip or zip or ace to backup amiga files
they are not specially designed for the amiga files
when you decrunch that compressed files you can lost comments and the correct date of the original files...also you can have problems with empty dirs and prblems with protection
use lha or lzx
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: 7zip vs. lha
« Reply #2 on: September 29, 2011, 07:04:53 PM »
For best results you can lha/lzx with no compression and compress the resulting archive with 7z/lzma/xz. That way the amiga attributes are preserved while also getting the best compress ratio.
 

Offline ChaosLordTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: 7zip vs. lha
« Reply #3 on: September 29, 2011, 07:08:02 PM »
Quote
do not use 7zip or zip or ace to backup amiga files
I didn't.  I made the archive with lha.
But I wanted to see if the archive survived the transfer thru my ancient Ethernet card to my bgcPC so I test extracted the files using 7zip.
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: 7zip vs. lha
« Reply #4 on: September 29, 2011, 07:10:33 PM »
Quote from: ChaosLord;661879
I didn't.  I made the archive with lha.
But I wanted to see if the archive survived the transfer thru my ancient Ethernet card to my bgcPC so I test extracted the files using 7zip.

Well 7zip lha implementation is quite buggy then.
 

Offline Tension

Re: 7zip vs. lha
« Reply #5 on: September 29, 2011, 07:54:39 PM »
Is the software set to break the archived file into 700KB chunks  (i.e to fit on a 720K PC floppy) for some reason?

Offline ChaosLordTopic starter

  • Hero Member
  • *****
  • Join Date: Nov 2003
  • Posts: 2608
    • Show only replies by ChaosLord
    • http://totalchaoseng.dbv.pl/news.php
Re: 7zip vs. lha
« Reply #6 on: September 29, 2011, 08:00:51 PM »
Quote from: Tension;661890
Is the software set to break the archived file into 700KB chunks  (i.e to fit on a 720K PC floppy) for some reason?
I don't know anything about that.  I don't understand what software you are talking about.  The .lha archive was 333MB
Wanna try a wonderfull strategy game with lots of handdrawn anims,
Magic Spells and Monsters, Incredible playability and lastability,
English speech, etc. Total Chaos AGA
 

Offline chris

Re: 7zip vs. lha
« Reply #7 on: September 29, 2011, 10:34:48 PM »
Quote from: ChaosLord;661879
I didn't.  I made the archive with lha.
But I wanted to see if the archive survived the transfer thru my ancient Ethernet card to my bgcPC so I test extracted the files using 7zip.


On Windows I only trust LhA NT to extract Amiga LhA archives correctly.

Quote from: LaserBack;661875
do not use 7zip or zip or ace to backup amiga files
they are not specially designed for the amiga files
when you decrunch that compressed files you can lost comments and the correct date of the original files...also you can have problems with empty dirs and prblems with protection
use lha or lzx


Agree with that.  Amiga 7za needs some serious work to support Amiga-style paths, ptotection bits and file comments whilst still maintaining compatibility.

It would probably be easier to add better compression schemes to LhA (such as LZMA2, or at least higher LZW variants that our LhA doesn't support but others do)
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline matthey

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 1294
    • Show only replies by matthey
Re: 7zip vs. lha
« Reply #8 on: September 30, 2011, 01:17:19 AM »
Quote from: Piru;661878
For best results you can lha/lzx with no compression and compress the resulting archive with 7z/lzma/xz. That way the amiga attributes are preserved while also getting the best compress ratio.


Yea, Linux users do something similar to preserve file attributes and directory structure. I believe they commonly use tar and then 7z.

 @ChaosLord
I have used Piotr Bardurski's 7za 9.13 (06/07/10) with 'x' for extraction without noticing any problems here. I have tried the xad module for 7z off of Aminet and it was VERY buggy and didn't recognize the 7z files I tried. It would be great to have a 68k xad 7z client. I have "xad UnFile", "xad UnDisk" and "xad List" in Diskmaster which makes the Linux multiple compressed files easy except for 7z and RAR :(. I normally keep using "xad UnFile" on them until they are extracted without worrying about what format they are in.
 

Offline chris

Re: 7zip vs. lha
« Reply #9 on: October 02, 2011, 04:26:05 PM »
Quote from: matthey;661940
I have tried the xad module for 7z off of Aminet and it was VERY buggy and didn't recognize the 7z files I tried.


I find that incredibly surprising, my inbox would be inundated with emails if that was the case.

To recognise files it simply looks for the file header "7z" (and the next few bytes, whatever they are).  This is the official header for 7-Zip files, so if it isn't recognising them your files are probably the issue.

I'm aware of potential stack overruns but these won't occur until it hits PPMd decompression.  Most 7-Zips use LZMA or LZMA2.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz
 

Offline matthey

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 1294
    • Show only replies by matthey
Re: 7zip vs. lha
« Reply #10 on: October 02, 2011, 05:42:02 PM »
@Chris
It works now! Maybe I had tried an older version or maybe it was a different xad driver altogether that gave me problems before. Awesome! Recommended! Thanks!

Here's the Aminet link for everyone...

http://aminet.net/util/arc/xad_7z.lha
 

Offline PanterHZ

  • Sr. Member
  • ****
  • Join Date: Jul 2009
  • Posts: 295
    • Show only replies by PanterHZ
    • http://www.rhz1.com
Re: 7zip vs. lha
« Reply #11 on: October 02, 2011, 09:11:37 PM »
Quote from: ChaosLord;661869
I had this problem last week but I forgot to paste my notes to the forum.

I am backing up my Amiga hard drive by making lha archives of each partition and then copying over Ethernet to my slave bgcpc.


 Original was:           555,403,364 bytes  42,727 files  1549 dirs 1152925 blocks used
 I lhaed the files and copied over to pc
 After 7zip extract was: 552,818,263 bytes  42,731 files  1534 folders

Ok I can explain that the dirs went down from 1549 to 1534 by assuming that 7zip prob has the same bug that ALL GUI lha archivers have: They never decompress empty dirs!  GRRRRRR

But the number of FILES went UP.  7zip created me 4 new files that I never had b4.  Wow!  I wonder if it can write code for me too?

While I was unzipping, 7zip produced from very bizarre errors: it kept extracting nonexistant files with the same name as the archive.  These files were around 700K each.  The REAL files were smaller and had real, normal names and were associated with A500 TC Jospels/Tools/ (Jospels is where my bro put his gfx)
So it did this 4 times.  I thought since 4 files overwrote each other that I would be MISSING 4 files, not GAIN 4 files.  Man this is weird!!!!

Like if I named the archive blah.lha then it would extra 4 files named blah.  So I renamed the archive to a.lha then it extracted 4 files named a.  This just totally blew my mind.

Just wondering, exactly where did you extract the files to? Have in mind that most archivers (including LhA) supports path lenghts of max 256 characters. This means that the destination path + paths in the archive can not exceed 256 chars upon extracting, if they do this the long paths may be truncated, and this in turn may lead to unpredictable results.

Some archivers use workarounds when dealing with files with long path names, here the files will first be extracted to a different location (with shorter path), and then they will be moved to the selected destination directory afterwards. Unfortunately this method can sometimes be a bit flaky, and I suspect that this may be the reason for the problems you are having.

Personally, I always use a short destination path when extracting files from really large archives, this is regardless of the OS, program or archive format used. On my pc for example, I have created a folder called "XXX" on my D: partition which is used for this exact purpose.
 

Offline matthey

  • Hero Member
  • *****
  • Join Date: Aug 2007
  • Posts: 1294
    • Show only replies by matthey
Re: 7zip vs. lha
« Reply #12 on: October 13, 2011, 03:16:10 AM »
@chris
xadUnFile is back to crashing with your xad_7z installed again. I consistently get "Exception 6: chk instruction" with PC=$2e. I tried using MuForce but the system freezes when I do with no hits before it does. xad_7z worked the first time I installed it and rebooted but crashes now with the same archive. There's plenty of stack for xadUnFile according to Scout.

I used BDebug to catch a crashed task and it looks like there is a branch to PC=8 first. Back tracking from the last stack entry, I find xad_xfd+$3f0 doing a jsr to exec/OpenLibrary() opening xfdmaster.library version $26. I don't see any problems with the xad_xfd code. Removing xad_7z from Libs:xad/ stops the crashes. I'm surprised no one else has reported this problem. Versions used are...

xadmaster.library 12.1
xad_7z 2.4
xad_xfd 1.1
xadUnFile 1.25

My setup is a 3000T with CSMK3 68060 using AmigaOS 3.9.
 

Offline slayer

  • Full Member
  • ***
  • Join Date: May 2009
  • Posts: 188
    • Show only replies by slayer
Re: 7zip vs. lha
« Reply #13 on: October 13, 2011, 04:23:32 AM »
When I back anything up I use tar with no compression (supports soft links too) then bz2 it with max compression...

not that I've backed anything up for a few years...
~Yes I am a Kiwi, No, I did not appear as an extra in \'Lord of the Rings\'~
1x AmigaOne X5000 2.0GHz 2gM RadeonR9280X AOS4.x
3x AmigaOne X1000 1.8GHz 2gM RadeonHD7970 AOS4.x
 

Offline chris

Re: 7zip vs. lha
« Reply #14 on: October 13, 2011, 08:27:16 AM »
Quote from: matthey;663378
@chris
xadUnFile is back to crashing with your xad_7z installed again. I consistently get "Exception 6: chk instruction" with PC=$2e. I tried using MuForce but the system freezes when I do with no hits before it does. xad_7z worked the first time I installed it and rebooted but crashes now with the same archive. There's plenty of stack for xadUnFile according to Scout.

I used BDebug to catch a crashed task and it looks like there is a branch to PC=8 first. Back tracking from the last stack entry, I find xad_xfd+$3f0 doing a jsr to exec/OpenLibrary() opening xfdmaster.library version $26. I don't see any problems with the xad_xfd code. Removing xad_7z from Libs:xad/ stops the crashes. I'm surprised no one else has reported this problem. Versions used are...

xadmaster.library 12.1
xad_7z 2.4
xad_xfd 1.1
xadUnFile 1.25

My setup is a 3000T with CSMK3 68060 using AmigaOS 3.9.


xad_xfd 68k version definitely doesn't work, remove it and see if that also stops xad_7z crashing.
"Miracles we do at once, the impossible takes a little longer" - AJS on Hyperion
Avatar picture is Tabitha by Eric W Schwartz