diff options
| author | B. Watson <urchlay@slackware.uk> | 2025-11-26 06:23:59 -0500 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2025-11-26 06:23:59 -0500 |
| commit | 829fd938876f1bbad56bfa792ab8a0a0a18b8fc6 (patch) | |
| tree | 28710cf29bd2cadd12dc58b74935be65022a5fae /src | |
| parent | fd8a5383e0c92aafe937038d299bb2ae62ee3239 (diff) | |
| download | unalf-829fd938876f1bbad56bfa792ab8a0a0a18b8fc6.tar.gz | |
Document 16MB limit in alf man page.
Diffstat (limited to 'src')
| -rw-r--r-- | src/alf.1 | 7 | ||||
| -rw-r--r-- | src/alf.c | 4 | ||||
| -rw-r--r-- | src/alf.rst | 7 |
3 files changed, 16 insertions, 2 deletions
@@ -94,6 +94,13 @@ Note that \fBalf\fP is a complete reverse\-engineered rewrite in C, \fInot\fP a port of the original 6502 code as \fBunalf\fP is. It\(aqs still being tested, and may still contain bugs. .sp +\fBalf\fP (and \fBLZ.COM\fP) have a 16MB file size limit. \fBuanlf\fP +actually can\(aqt handle files above about 15MB, if you compress one with +\fBalf\fP\&. Real Atari 8\-bit files are never this large anyway, so it\(aqs +a pathological case. A real Atari would take hours or even days to +compress/decompress such files, and you\(aqd have to have a hard disk and +a DOS capable of handling multi\-megabyte files... +.sp Performance is \fIhorrible\fP\&. This shouldn\(aqt be a real problem on modern multi\-GHz CPU, especially since most Atari 8\-bit files are small (usually under 64KB). Interestingly, it\(aqs not O(n^2), it scales @@ -211,7 +211,7 @@ int match_token(int pos) { } if(bestmatch == -1) { - fprintf(stderr, "bestmatch is -1, this should never happen\n"); + fprintf(stderr, "BUG: bestmatch is -1, this should never happen!\n"); exit(1); } @@ -270,7 +270,7 @@ void crunch_file(const char *filename) { /* read in entire input, couldn't do it this way on the Atari */ input_len = fread(input_buf, 1, MAX_INPUT_SIZE - 1, in_file); if(!feof(in_file)) { - fprintf(stderr, "%s: warning: this file is too large; only compressing the first 16MB.\n", self); + fprintf(stderr, "%s: this file is too large; only compressing the first 16MB.\n", self); } output_len = 0; fstat(fileno(in_file), &in_file_stat); /* for timestamp */ diff --git a/src/alf.rst b/src/alf.rst index 63c88b2..0968d68 100644 --- a/src/alf.rst +++ b/src/alf.rst @@ -81,6 +81,13 @@ Note that **alf** is a complete reverse-engineered rewrite in C, *not* a port of the original 6502 code as **unalf** is. It's still being tested, and may still contain bugs. +**alf** (and **LZ.COM**) have a 16MB file size limit. **uanlf** +actually can't handle files above about 15MB, if you compress one with +**alf**. Real Atari 8-bit files are never this large anyway, so it's +a pathological case. A real Atari would take hours or even days to +compress/decompress such files, and you'd have to have a hard disk and +a DOS capable of handling multi-megabyte files... + Performance is *horrible*. This shouldn't be a real problem on modern multi-GHz CPU, especially since most Atari 8-bit files are small (usually under 64KB). Interestingly, it's not O(n^2), it scales |
