You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original issue 10 created by openvcdiff on 2008-09-12T16:46:51.000Z:
The current encoder interface VCDiffStreamingEncoder::EncodeChunk() accepts a contiguous block of memory and creates a single VCDIFF delta window (including a window header) each time it is called. The intended use is for the caller to gather all available input data into a buffer before calling EncodeChunk(), so that the encoded delta window can be sent to streaming output such as a TCP connection or output file.
However, there may be cases in which the currently available input data is split up into more than one contiguous memory block. Imagine that, instead of a single block "ABCDEF", two blocks "ABC" and "DEF" are available for encoding. EncodeChunk("ABC", ...) will be called, then EncodeChunk("DEF", ...), and each of the two blocks will get its own delta window header (about a dozen bytes.) To avoid wasting that space, the caller has to copy the multiple blocks into a single contiguous memory buffer before calling EncodeChunk().
Proposed enhancement: add a new interface (probably a new encoder class in addition to VCDiffStreamingEncoder) that will queue up calls to EncodeChunk() and not output a delta window until a function FinishWindow() is called. The caller will use FinishWindow() to indicate that no more
input data is available at the moment, and that the encoder should generate as much output data as it can. Calling FinishEncoding() will implicitly finish the current window.
The text was updated successfully, but these errors were encountered:
Original issue 10 created by openvcdiff on 2008-09-12T16:46:51.000Z:
The current encoder interface
VCDiffStreamingEncoder::EncodeChunk()
accepts a contiguous block of memory and creates a single VCDIFF delta window (including a window header) each time it is called. The intended use is for the caller to gather all available input data into a buffer before callingEncodeChunk()
, so that the encoded delta window can be sent to streaming output such as a TCP connection or output file.However, there may be cases in which the currently available input data is split up into more than one contiguous memory block. Imagine that, instead of a single block
"ABCDEF"
, two blocks"ABC"
and"DEF"
are available for encoding.EncodeChunk("ABC", ...)
will be called, thenEncodeChunk("DEF", ...)
, and each of the two blocks will get its own delta window header (about a dozen bytes.) To avoid wasting that space, the caller has to copy the multiple blocks into a single contiguous memory buffer before callingEncodeChunk()
.Proposed enhancement: add a new interface (probably a new encoder class in addition to
VCDiffStreamingEncoder
) that will queue up calls toEncodeChunk()
and not output a delta window until a functionFinishWindow()
is called. The caller will useFinishWindow()
to indicate that no moreinput data is available at the moment, and that the encoder should generate as much output data as it can. Calling
FinishEncoding()
will implicitly finish the current window.The text was updated successfully, but these errors were encountered: