>From: Giorgos Keramidas <[EMAIL PROTECTED]>

>On 2005-11-03 22:56, kamal kc <[EMAIL PROTECTED]> wrote:

>> since i am using the adaptive LZW compression scheme it
>> requires construction of string table for
>> compression/decompression. So an ip packet of size 1500 bytes
>> requires a table of size (4KB + 4KB + 2KB = 12KB).
>
>I may be stating the obvious or something totally wrong, but
>couldn't the string table be constructed once instead of each
>time a packet goes down?  It is my intuition that this would
>perform much much better than re-doing the work of the string
>table each time a packet goes out.

No, the table changes as data is compressed. It records
the knowledge about the strings that have already
occured in the data.

Keeping the table between the packets would improve the
compression but the packets would have to be transmitted
through a reliable medium since to decompress a packet
you would have to decompress all the preceding packets
first (essentially you get a stream compression).
To keep the packets separate, the compression state
must be reset between them.

But of course resetting the compression state does not
mean that the memory should be deallocated.

-SB

_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to