Closed g1mv closed 9 years ago
Really the only thing that makes density's stream api hard to use is the fact that the output always has to be >= DENSITY_STREAM_MINIMUM_OUT_BUFFER_SIZE
. That forces consumers to add a buffer, and either always pay for a memcpy
or add complexity to switch back and forth between using the buffer and not using it.
Other than that, the only thing missing seems to be a flush operation. I'm not sure if that is feasible or not, but it's really only used for compressing a stream which runs over the network.
Make the stream API more similar to bzip2's in terms of flexibility