[lkml]   [2001]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: libz, libbz2, ramfs and cramfs
    I wrote:

    > I added a deflateOutputPending routine which returns the number of
    > bytes of data that the compressor has pending to give to you.

    I just checked and in fact ppp_deflate doesn't use this.

    > I added a check so that it is legal to set strm->next_out to NULL and
    > the de/compressor will just discard its output data. This is useful
    > on the sending side for PPP-deflate because there are situations where
    > the transmitted data has to be added to the compressor's history but
    > may not be transmitted in compressed form.

    ppp_deflate doesn't use next_out = NULL in this case, but it does use
    next_out = NULL when we are compressing a packet and the compressed
    packet turns out to be larger than the uncompressed. With deflate
    there is a limit on how much larger the compressed packet would be, so
    it would be possible to give it a small extra buffer on the stack
    instead of using next_out = NULL.

    If we were going to standardize on a newer zlib in the kernel, I could
    change ppp_deflate to cope with that without too much pain, I think.
    The main thing I would want to add is a way to check what state the
    decompressor is in at the end of each packet - we want
    strm->state->blocks->mode == LENS at that point, which is not
    something that can be checked using the existing zlib interface.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:08    [W:0.022 / U:2.208 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site