OpenMetaverse Protocol Library Developers API Documentation
ZeroEncode Method (src, srclen, dest)
NamespacesOpenMetaverseHelpersZeroEncode( array< Byte > [] () [] [] , Int32, array< Byte > [] () [] [] )
Encode a byte array with zerocoding. Used to compress packets marked with the zerocoded flag. Any zeroes in the array are compressed down to a single zero byte followed by a count of how many zeroes to expand out. A single zero becomes 0x00 0x01, two zeroes becomes 0x00 0x02, three zeroes becomes 0x00 0x03, etc. The first four bytes are copied directly to the output buffer.
Declaration Syntax
C#
public 
static 
int 
ZeroEncode(
        
byte[] 
src,
        
int 
srclen,
        
byte[] 
dest
)
Parameters
src ( array< Byte > [] () [] [] )
The byte array to encode
srclen ( Int32)
The length of the byte array to encode
dest ( array< Byte > [] () [] [] )
The output byte array to encode to
Return Value
The length of the output buffer

Assembly: OpenMetaverse(Module: OpenMetaverse.dll) Version: 0.9.3.3318 (0.9.3.3318)