[PLUG] Compressed data files
Paul Heinlein
heinlein at attbi.com
Mon Nov 11 16:36:27 UTC 2002
On 11 Nov 2002, Ed Sawicki wrote:
> I'm wondering how some programs deal with data files that are
> sometimes compressed using gzip. I haven't yet written code for
> this.
>
> Taking the loadkeys program as an example, it can read keyboard map
> files that are either compressed or uncompressed (us.map or
> us.map.gz). Loadkeys is dynamically-linked and uses only libc.so.6.
> Does libc provide programmers with the ability to read compressed
> files or is this coded into the loadkeys program?
It looks to me like it probably forks an external process:
[heinlein]$ strings /bin/loadkeys | grep -i zip
bunzip2
gunzip
If I were you, I'd grab the console-tools source code and grep for
'unzip'.
--Paul Heinlein <heinlein at attbi.com>
More information about the PLUG
mailing list