ream/storage/stream/index
Types
pub type Index {
Index(offset: Int, size: Int, file_id: Int)
}
Constructors
-
Index(offset: Int, size: Int, file_id: Int)
Constants
pub const event_size_bits: Int = 24
event size (in bits) is storing letting us store events of 2^24 bits (16MB) of data
pub const file_id_size_bits: Int = 128
the size of the file id in bytes, it’s 16 bytes or 128 bits representing a 128 bit integer (UUID)
pub const index_size_bytes: Int = 25
the size of the index entry in bytes, it’s 25 bytes because we’re storing the offset (6 bytes), the event size (3 bytes) and the file id (16 bytes).
pub const offset_size_bits: Int = 48
the size of the offset in bytes, it’s 6 bytes or 48 bits letting us store offsets of 2^48 bytes (256TB) of data