public static byte GetChecksum(byte crc, PlainBufferCell cell)
        {
            if (cell.HasCellName())
            {
                crc = crc8(crc, cell.GetNameRawData());
            }

            if (cell.HasCellValue())
            {
                if (cell.IsPk())
                {
                    crc = cell.GetPkCellValue().GetChecksum(crc);
                }
                else
                {
                    crc = cell.GetCellValue().GetChecksum(crc);
                }
            }

            if (cell.HasCellTimestamp())
            {
                crc = crc8(crc, cell.GetCellTimestamp());
            }

            if (cell.HasCellType())
            {
                crc = crc8(crc, cell.GetCellType());
            }

            return(crc);
        }
        public List <PlainBufferCell> ReadRowPK()
        {
            if (!CheckLastTagWas(PlainBufferConsts.TAG_ROW_PK))
            {
                throw new IOException("Expect TAG_ROW_PK but it was " + PlainBufferConsts.PrintTag(GetLastTag()));
            }

            List <PlainBufferCell> primaryKeyColumns = new List <PlainBufferCell>();

            ReadTag();
            while (CheckLastTagWas(PlainBufferConsts.TAG_CELL))
            {
                PlainBufferCell cell = ReadCell();
                primaryKeyColumns.Add(cell);
            }

            return(primaryKeyColumns);
        }