public CollectionFileRoot Deserialize(byte[] bytes)
        {
            var reader = new BufferReader(bytes);
            var root   = new CollectionFileRoot();

            reader.ReadByte(); //read SERIALIZATION_VERSION
            root.FormatVersion           = reader.ReadInt32();
            root.Head                    = reader.ReadInt64();
            root.NamedRecordIndexAddress = reader.ReadInt64();

            root.Clean();
            return(root);
        }
        public TransactionJournal Deserialize(byte[] bytes)
        {
            var reader = new BufferReader(bytes);

            reader.ReadByte(); //FORMAT_VERSION

            var journal    = new TransactionJournal();
            var entryCount = reader.ReadInt32();

            for (int i = 0; i < entryCount; i++)
            {
                journal.Entries.Add(ReadEntry(reader));
            }
            return(journal);
        }