*** DISCLAIMER: The information on these pages is not an official instruction or documentation. No responsibility will be taken. Use at your own risk. ***

Thursday, February 27, 2020

How do I create Amiga-compatible lha archives on other platforms (Linux)?

Problem

You've created an lha archive, e.g. on Linux, and your Amiga's lha is unable to decompress it.

Error message: "ERROR on file '...' : Unknown compression"

Possible reason

The lha version used to create the archive is newer than your Amiga's lha version, and/or uses a different default compression method.

You might have obtained your Amiga lha binaries from AmiNet, by downloading the self-extracting lha archive which contains them, and have used these to extract other lha archives from AmiNet.
http://aminet.net/search?query=lha.run
Depending on when you did so, these binaries might be quite old, and have different options than the lha version you're using e.g. on your Linux machine, including compression method settings.

Solution

Manually set lha compression method when creating archive - lh5 will probably the best supported. Here's a quick overview of some lha versions, and the most commonly available compression methods:

Linux "LHa for UNIX version 1.14i-ac20081023":

lha a -o5 filename.lha myfile
      use lh5 compression

lha a -o6 filename.lha myfile
      use lh6 compression

Amiga "LhA Evaluation V1.54 - Copyright (c) 1993 by Stefan Boberg":
(This version does not support lh6 compression.)

lha a -1 filename.lha myfile
      use lh4 compression

lha a -2 filename.lha myfile
      use lh5 compression

Amiga "LhA Freeware Version 2.15":

lha a -2 filename.lha myfile
      use lh5 compression

lha a -3 filename.lha myfile
      use lh6 compression


To check an archive's compression method, use "vv":

lha vv filename.lha

See lha's man page / info / help / version texts for detailed info about more compression options (lh1, lh7, ...).

* * *

No comments:

Post a Comment

Your comment will published after it has been reviewed.