aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-11-26 06:23:59 -0500
committerB. Watson <urchlay@slackware.uk>2025-11-26 06:23:59 -0500
commit829fd938876f1bbad56bfa792ab8a0a0a18b8fc6 (patch)
tree28710cf29bd2cadd12dc58b74935be65022a5fae /src
parentfd8a5383e0c92aafe937038d299bb2ae62ee3239 (diff)
downloadunalf-829fd938876f1bbad56bfa792ab8a0a0a18b8fc6.tar.gz
Document 16MB limit in alf man page.
Diffstat (limited to 'src')
-rw-r--r--src/alf.17
-rw-r--r--src/alf.c4
-rw-r--r--src/alf.rst7
3 files changed, 16 insertions, 2 deletions
diff --git a/src/alf.1 b/src/alf.1
index a2185bb..cb735b7 100644
--- a/src/alf.1
+++ b/src/alf.1
@@ -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
diff --git a/src/alf.c b/src/alf.c
index d03ece7..27b6d86 100644
--- a/src/alf.c
+++ b/src/alf.c
@@ -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