| 265 | } |
| 266 | |
| 267 | bool BinaryLookup::loadHeader(std::ifstream &file, size_t length) |
| 268 | { |
| 269 | file.read ((char*)&this->m_header, sizeof(Header)); |
| 270 | |
| 271 | // FIXME: Consider LSB Vs MSB number representation |
| 272 | assert(getStorageMode(this->m_header.magic_key) == LSB); |
| 273 | |
| 274 | if (this->m_header.whole_file_size != (int)length) |
| 275 | { |
| 276 | // the file has not been correctly initialized (yet) |
| 277 | return false; |
| 278 | } |
| 279 | |
| 280 | return true; |
| 281 | } |
| 282 | |
| 283 | bool BinaryLookup::loadBinaryAndSignature(std::ifstream &file) |
| 284 | { |
nothing calls this directly
no test coverage detected