예제 #1
0
        public void Copy(int offset, int length)
        {
            byte mode = addrCache.EncodeAddress(offset, dictionarySize + targetLength, out long encodedAddr);

            EncodeInstruction(VCDiffInstructionType.COPY, length, mode);
            if (addrCache.WriteAddressAsVarint(mode))
            {
                VarIntBE.AppendInt64(encodedAddr, addressForCopy);
            }
            else
            {
                addressForCopy.WriteByte((byte)encodedAddr);
            }
            targetLength += length;
        }