MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / readUniqueIndexStore

Method readUniqueIndexStore

source/game/StarWorldStorage.cpp:547–555  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

545}
546
547WorldStorage::UniqueIndexStore WorldStorage::readUniqueIndexStore(ByteArray const& data) {
548 return DataStreamBuffer::deserializeMapContainer<UniqueIndexStore>(uncompressData(data),
549 [](DataStream& ds, String& key, SectorAndPosition& value) {
550 ds.read(key);
551 ds.cread<uint16_t>(value.first[0]);
552 ds.cread<uint16_t>(value.first[1]);
553 ds.read(value.second);
554 });
555}
556
557ByteArray WorldStorage::writeUniqueIndexStore(UniqueIndexStore const& store) {
558 return compressData(DataStreamBuffer::serializeMapContainer(store,

Callers

nothing calls this directly

Calls 2

uncompressDataFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected