[BusyBox] Weird, long-term thought on message strings
Larry Doolittle
ldoolitt at recycle.lbl.gov
Wed Jan 31 19:16:54 UTC 2001
Run the following perl program on busybox/*.c
#!/usr/bin/perl
while (<>) {
if ((/_msg/ && /\( *\"/)||(/DEF_MESSAGE/ && /\"/)) {
if (/"(.*)"/) { print "$1\n"; }
}
}
$ perl $ABOVE *.c | head
cannot read magic\n
invalid magic\n
Cannot read %s\n
%s
%s
applet not found\n
unknown mode: %s\n
unknown user name: %s\n
unknown group name: %s\n
cannot change root directory to %s
Broken pipe
$ perl $ABOVE *.c | wc
548 1960 12578
$ perl $ABOVE *.c | gzip -c | wc
24 112 4419
This gives a rough picture of the _possible_ savings.
Actually _implementing_ message text compression in
a clean, maintainable way may not be practical.
OTOH, if the concept were kept in mind during an
internationalization effort, someone might come up
with a breakthrough.
- Larry
More information about the busybox
mailing list