glk01126@uxa.cso.uiuc.edu (09/01/89)
Can't someone write a PACK/CRUNCH type dealie that compresses all writes and uncompresses the reads when any file action is done?
dag@per2.UUCP (Daniel A. Glasser) (09/07/89)
In article <111500025@uxa.cso.uiuc.edu>, glk01126@uxa.cso.uiuc.edu writes: > Can't someone write a PACK/CRUNCH type dealie that > compresses all writes and uncompresses the reads when any > file action is done? Yes and no. This works only when you never need to do an update operation on the file from any application. A purely sequential file can be compressed on write and decompressed on read, but it cannot be seek'ed into, records cannot be skipped, and in all likelyhood, it cannot be appended to once closed. There are exceptions, of course. The reason for this is that any two arbitrary strings of bytes of the same length are unlikely to compress to the same number of bytes. Change one character in the uncompressed stream and the size of the compressed stream may change by several bytes in either direction. -- _____________________________________________________________________________ Daniel A. Glasser One of those things that goes uwvax!per2!dag "BUMP!!!(ouch)" in the night. ---Persoft, Inc.---------465 Science Drive-------Madison, WI 53711-----------