Generalize footer reading from file

Summary:

Generalizing this process will help us to re-use the code for plain table

Test Plan:

ran ./table_test
This commit is contained in:
Kai Liu
2013-12-04 16:35:48 -08:00
parent 5dec7acd91
commit 219b35be6a
4 changed files with 36 additions and 22 deletions

View File

@@ -98,6 +98,11 @@ class Footer {
const uint64_t kTableMagicNumber;
};
// Read the footer from file
Status ReadFooterFromFile(RandomAccessFile* file,
uint64_t file_size,
Footer* footer);
// 1-byte type + 32-bit crc
static const size_t kBlockTrailerSize = 5;