• CP/M archive/compression tools

    From Bob Kircher@21:1/5 to All on Wed Aug 23 13:31:33 2023
    Are there versions of nulu, squeeze, crunch etc that are capable of running on unix/Linux? It would be very convenient to do some archive/dearchive work on a modern system then copy to the CP/M machine.

    -Bob

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Dennis Boone@21:1/5 to All on Wed Aug 23 23:46:04 2023
    Are there versions of nulu, squeeze, crunch etc that are capable of
    running on unix/Linux? It would be very convenient to do some archive/dearchive work on a modern system then copy to the CP/M machine.

    A few:

    arc - https://github.com/ani6al/arc
    unar - https://theunarchiver.com/command-line

    Plan B, run MS-DOS utilities under DOSBOX or similar. DOSBOX can treat
    a host directory as a DOS disk volume, making interchange easy. There
    are tools similar to DOSBOX for running CP/M tools from a unix command
    line that might serve for directly running the CP/M archivers, but I
    haven't explored the host filesystem support there.

    De

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence Sonderling@21:1/5 to Dennis Boone on Wed Aug 23 18:02:40 2023
    Dennis Boone wrote on 8/23/23 16:46:
    > Are there versions of nulu, squeeze, crunch etc that are capable of
    > running on unix/Linux? It would be very convenient to do some
    > archive/dearchive work on a modern system then copy to the CP/M machine.

    A few:

    arc - https://github.com/ani6al/arc
    unar - https://theunarchiver.com/command-line

    Plan B, run MS-DOS utilities under DOSBOX or similar. DOSBOX can treat
    a host directory as a DOS disk volume, making interchange easy. There
    are tools similar to DOSBOX for running CP/M tools from a unix command
    line that might serve for directly running the CP/M archivers, but I
    haven't explored the host filesystem support there.

    De

    There are a number of other programs that will compile and run under LINUX:

    Carson Wilson's cfx13.zip
    squeeze.zip (contains several programs)
    uncr233.zip
    ldir-ltype.zip

    You can probably find these easily.

    Good luck!

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Russell Marks@21:1/5 to Bob Kircher on Thu Aug 24 09:14:08 2023
    Bob Kircher <rek1047@gmail.com> wrote:

    Are there versions of nulu, squeeze, crunch etc that are capable of
    running on unix/Linux? It would be very convenient to do some archive/dearchive work on a modern system then copy to the CP/M
    machine.

    You seem to be referring to LBR there, but nowadays I think zip might
    actually be a reasonable option. You could make a DOS-style zip with
    "zip -k", then use this version of CP/M unzip (which supports the
    Deflate method) to extract it:

    https://github.com/agn453/UNZIP-CPM-Z80

    Also, nomarch extracts .arc, and lbrate extracts .lbr and deals with decompression:

    https://zgedneil.nfshost.com/nomarch.html
    https://www.ibiblio.org/pub/Linux/utils/compress/lbrate-1.1.tar.gz

    Disclaimer - I may have had some involvement with the above, but they
    seem to work despite that. :-)

    (Compiling lbrate does give a warning for me after 20+ years - which
    looks a lot like the issue I just fixed in nomarch - but in practice
    it should still be ok to use as-is.)

    -Rus.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Russell Marks@21:1/5 to Lawrence Sonderling on Thu Aug 24 09:00:41 2023
    Lawrence Sonderling <lsonderling@gmail.com> wrote:

    There are a number of other programs that will compile and run under LINUX:

    Carson Wilson's cfx13.zip

    It looks like CFX was meant to compile on Unix of some sort as well as
    DOS, but unless I'm doing something wrong, the contents of cfx13.zip
    don't seem to compile on Linux. Even if you avoid using the Makefile
    entirely there are still errors.

    The zip I tried was http://www.z80.eu/downloads/cfx13.zip .

    -Rus.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Russell Marks@21:1/5 to Russell Marks on Thu Aug 24 10:19:31 2023
    Russell Marks <zgedneil@spam^H^H^H^Hgmail.com> wrote:

    Lawrence Sonderling <lsonderling@gmail.com> wrote:

    There are a number of other programs that will compile and run under LINUX: >>
    Carson Wilson's cfx13.zip

    It looks like CFX was meant to compile on Unix of some sort as well as
    DOS, but unless I'm doing something wrong, the contents of cfx13.zip
    don't seem to compile on Linux. Even if you avoid using the Makefile
    entirely there are still errors.

    The zip I tried was http://www.z80.eu/downloads/cfx13.zip .

    Aha - the Unix side seems to have been broken after 1.1. The source to
    1.1 still seems to be available e.g. here:

    http://www.museodelcomputer.org/parts/commodore/1541/docs/devil/pub/archivers/cfx11src.zip

    Presumably the relevant parts like unixfunc.c could be reincorporated
    to get 1.3 compiling again, but I'm not volunteering. :-)

    -Rus.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Ogden@21:1/5 to Russell Marks on Fri Aug 25 13:10:38 2023
    On Thursday, 24 August 2023 at 11:19:36 UTC+1, Russell Marks wrote:
    Russell Marks <zgedneil@spam^H^H^H^Hgmail.com> wrote:

    Lawrence Sonderling <lsond...@gmail.com> wrote:

    There are a number of other programs that will compile and run under LINUX:

    Carson Wilson's cfx13.zip

    It looks like CFX was meant to compile on Unix of some sort as well as DOS, but unless I'm doing something wrong, the contents of cfx13.zip
    don't seem to compile on Linux. Even if you avoid using the Makefile entirely there are still errors.

    The zip I tried was http://www.z80.eu/downloads/cfx13.zip .
    Aha - the Unix side seems to have been broken after 1.1. The source to
    1.1 still seems to be available e.g. here:

    http://www.museodelcomputer.org/parts/commodore/1541/docs/devil/pub/archivers/cfx11src.zip

    Presumably the relevant parts like unixfunc.c could be reincorporated
    to get 1.3 compiling again, but I'm not volunteering. :-)

    -Rus.
    My mlbr utility https://github.com/ogdenpm/mlbr builds under linux gcc -o mlbr *.c
    The corresponding mklbr https://github.com/ogdenpm/mklbr also builds gcc -o mklbr *.c

    mlbr extracts files from lbr, squeeze, crunch and lzh including variants. Options allow recursive expansion. It also supports conversion to zip and extraction of timestamp / info. For Windows it also renames files that are illegal, generating an
    information file on files renamed.
    mklbr creates lbr files and allows timestamps to be set by using a recipe file.

    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From ldkraemer@gmail.com@21:1/5 to All on Sat Aug 26 02:24:56 2023
    Another option is to use RunCPM on Linux, and just copy the Utilities to /home/user/RunCPM/A/0 and use the CP/M utilities to extract or unsqueeze
    what you want from .LBR files or *.?Q? files.

    Simple and works.

    Larry

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Bob Kircher@21:1/5 to All on Sat Aug 26 16:09:46 2023
    Lots of good information here, thanks to all. Sounds like Larry's suggestion of RunCPM just might be the most straightforward.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Russell Marks@21:1/5 to Mark Ogden on Sun Aug 27 10:43:31 2023
    Mark Ogden <ogdenpm@gmail.com> wrote:

    My mlbr utility https://github.com/ogdenpm/mlbr builds under linux

    Speaking of mlbr, would you mind clarifying the licence? The closest
    thing I can find (aside from miniz.h and uncrunch.c) is that "This is
    an open source non-commercial project".

    Also, what do you consider the licence to be on the original lzhuf.c?
    I went to some effort to clarify this before adapting it for lbrate,
    and I'd be interested in your perspective.

    Finally, I found the most curious thing. This code from mlbr's
    uncrunch.c (which I'm assuming it's reasonable to post in order to
    comment on it):

    if (pred == IMPRED && chr == 0) {
    hashval = 0x800; /* special case (leaving the zero code free for EOF) */
    } else {
    /* normally we do a slightly awkward mid-square thing */
    uint16_t a = (((pred + chr) | 0x800) & 0x1fff);
    uint16_t b = (a >> 1);
    hashval = (((b * (b + (a & 1))) >> 4) & 0xfff);
    }

    ...seems to have remarkably similar comments to this code I wrote in
    2001 for lbrate's readlzw.c:

    if(oldcode==0xffff && chr==0)
    hashval=0x800; /* special case (leaving the zero code free for EOF) */
    else
    {
    /* normally we do a slightly awkward mid-square thing */
    a=(((oldcode+chr)|0x800)&0x1fff);
    b=(a>>1);
    hashval=(((b*(b+(a&1)))>>4)&0xfff);
    }

    I also notice that most of an older version's "slightly odd approach"
    comment at line 109 here:

    https://github.com/ogdenpm/mlbr/blob/35cf3093a4e7b39c70383c1b085391ca7cc62aec/uncrunch.c

    ...was in lbrate many years earlier, with the same "If" typo.

    So I'd be interested in your thoughts on this as well.

    -Rus.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Mark Ogden@21:1/5 to Russell Marks on Mon Aug 28 03:48:48 2023
    On Sunday, 27 August 2023 at 11:43:34 UTC+1, Russell Marks wrote:
    Mark Ogden <ogd...@gmail.com> wrote:

    My mlbr utility https://github.com/ogdenpm/mlbr builds under linux
    Speaking of mlbr, would you mind clarifying the licence? The closest
    thing I can find (aside from miniz.h and uncrunch.c) is that "This is
    an open source non-commercial project".

    Also, what do you consider the licence to be on the original lzhuf.c?
    I went to some effort to clarify this before adapting it for lbrate,
    and I'd be interested in your perspective.

    Finally, I found the most curious thing. This code from mlbr's
    uncrunch.c (which I'm assuming it's reasonable to post in order to
    comment on it):

    if (pred == IMPRED && chr == 0) {
    hashval = 0x800; /* special case (leaving the zero code free for EOF) */
    } else {
    /* normally we do a slightly awkward mid-square thing */
    uint16_t a = (((pred + chr) | 0x800) & 0x1fff);
    uint16_t b = (a >> 1);
    hashval = (((b * (b + (a & 1))) >> 4) & 0xfff);
    }

    ...seems to have remarkably similar comments to this code I wrote in
    2001 for lbrate's readlzw.c:

    if(oldcode==0xffff && chr==0)
    hashval=0x800; /* special case (leaving the zero code free for EOF) */
    else
    {
    /* normally we do a slightly awkward mid-square thing */ a=(((oldcode+chr)|0x800)&0x1fff);
    b=(a>>1);
    hashval=(((b*(b+(a&1)))>>4)&0xfff);
    }

    I also notice that most of an older version's "slightly odd approach" comment at line 109 here:

    https://github.com/ogdenpm/mlbr/blob/35cf3093a4e7b39c70383c1b085391ca7cc62aec/uncrunch.c

    ...was in lbrate many years earlier, with the same "If" typo.

    So I'd be interested in your thoughts on this as well.

    -Rus.
    Russell
    I originally wrote mlbr for personal use, mainly to support windows filename mapping. I went on to add support for date and information extraction, along with conversion to zip files. In previous new group chats I offered the code for others to use by
    posting on my github site. Although I didn't share, I had previously added some windows filename mapping to cfx1.3 and fixed some bugs.

    It is plausible that the code you noted came from lbrate. Whilst refactoring the original code, it looks like I used your implementation of the hash algorithm. I will make sure that the copyright notice at the top of the code is updated to include your
    name. My apologies for the oversight. If you are not ok with this let me know.

    As I use git, the fact that historic versions, contained the "slightly odd approach" text, would also suggest at some point I had copied other fragments of your code, prior to rewriting. In this case the count element of the for loop was removed as it is
    only called if there is room and the hash table probing ensures all entries are checked.

    As to the general licencing position, I would suggest that as a whole, an open source non-commercial licence is sensible and inline with my original intent. This is based on the following
    mizip - provided as is
    lzhuf - based on your interaction with the respective authors
    uncrunch - original Frank Prindle + prior work. I will add you to the list unsqueeze - not sure where I derived this from. There are multiple similar versions available. None seem to have specific licence conditions.
    crc16 - derived from public domain source
    lbr support, date support, general program wrap, fixes and new errors - happy to licence these as open source non-commercial .

    I am also happy for the sister application mklbr to be under the same licence.

    Mark

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Russell Marks@21:1/5 to Mark Ogden on Mon Aug 28 16:17:32 2023
    Mark Ogden <ogdenpm@gmail.com> wrote:

    It is plausible that the code you noted came from lbrate. Whilst
    refactoring the original code, it looks like I used your
    implementation of the hash algorithm. I will make sure that the
    copyright notice at the top of the code is updated to include your
    name. My apologies for the oversight. If you are not ok with this let
    me know.

    Thank you, that's fine. I think it might be best from your perspective
    to also say the code is included with permission - as it may not be
    under the usual licence - but that's up to you.

    Obviously, I do appreciate that this is a very small part of the code
    overall.

    As to the general licencing position, I would suggest that as a whole,
    an open source non-commercial licence is sensible and inline with my
    original intent.

    Maybe you should pick an actual specific licence though - one
    compatible with the various things you're including. Usually you need
    to at least be sure to grant users permission to copy your program,
    for example. But this isn't legal advice, I'm not an expert, that's
    just what I think. :-)

    -Rus.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From rwdeane@gmail.com@21:1/5 to Bob Kircher on Tue Aug 29 10:13:30 2023
    On Wednesday, 23 August 2023 at 21:31:35 UTC+1, Bob Kircher wrote:
    Are there versions of nulu, squeeze, crunch etc that are capable of running on unix/Linux? It would be very convenient to do some archive/dearchive work on a modern system then copy to the CP/M machine.

    -Bob
    Why not zip on PC, and use AGN (Tony Nicholson)'s unzip on CP/M . He keeps it bug fixed and updated. Can unzip Windows default zip compression. He is on Github.?

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Tony Nicholson@21:1/5 to All on Wed Aug 30 16:16:16 2023
    Why not zip on PC, and use AGN (Tony Nicholson)'s unzip on CP/M . He keeps it bug fixed and updated. Can unzip Windows default zip compression. He is on Github.?

    I do check in here occasionally (but not as often as I used to due to health and
    family issues).

    There's been activity on the UNZIP-CPM-Z80 GitHub repo in the last week where Jonathon Harston has tweaked a few things. He may be working on a CP/M
    native Z80 version of ZIP too.

    See https://github.com/agn453/UNZIP-CPM-Z80 for details (and my GitHub
    profile has my e-mail contact details).

    Tony

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)