Skip to content

dm zip

'dm zip' produces zip4 and zip5 sets is "Zipcode" format, which was and still is a widelyt used multipart full disk archive format. On the native system these are named using a prefix instead of a suffix: 1!filename, 2!filename, ... up to 5!filename for a five part set. Four parts are used for 35 track disk images and five parts for 40 track images. By default 'dm zip' creates a zip4 set from a 35 track .d64 and a zip5 set from a 40 track d64 but you can use use -4/--four to force only four parts.

Features

  • as much as possible, input/output names are automatically recognized or produced
  • 'bam zipper' mode: use '-f/--free' to output unallocated sectors as zero filled regardless of their actual content on the disk.
  • by default, 'dm zip' computes RLE tokens across the entire disk instead of per block; see below.

Example

dm zip sx64-demo.d64 sx64
1!sx64:  29571
2!sx64:  39323
3!sx64:  36196
4!sx64:  21948
        ------
        127038 bytes
         47810 bytes saved (27%)

RLE Tokens

The original Zipcode works by processing each disk block, one at a time. A basic run length compression scheme is used for disk blocks where such compression can produce a size reduction. The run length encoding (RLE) uses a single token byte that is chosen for that disk block (an otherwise unused byte).

'dm zip', by default, chooses run length tokens only after processing the entire disk and determining the best token candidates - those bytes that appear the least across all disk blocks. This tends to produce a fewer number of run length token bytes overall. To put this in terms of compression, this tends to increase redundancy. While this does not make any difference to the size of the 4 or 5 zip file parts themselves, it usually results in a size reduction after downstream compression is used. For example, a test using the SX-64 demo disk:

After zipping:   Original zipcode:   'dm zip'
29571 '1!sx64'   55477 sx64.tar.gz   55408 sx64.tar.gz
39323 '2!sx64'   54745 sx64.rar      54665 sx64.rar
36196 '3!sx64'                      
21948 '4!sx64'                        

You can use the "-B/--block" option to force 'dm zip' to compute tokens per block.