class

Bakelite::StoredItem

Inherits Bakelite::Item < Reference < Object

Chunked, compressed, and stream-backed asset (Store mode). Employs Bakelite::FileIO to stream chunks on demand in O(chunk_size) RAM.

Constructors

new(path : String, volume_name : Symbol | String, size : Int64, compressed_size : Int64, chunks : Array(Chunk), compression : CompressionType = CompressionType::None, mime_type : String | Nil = nil, crc32 : UInt32 = 0_u32, underlying_io : IO | Nil = nil)
Source

Instance methods

chunks
Source
compression
Source
open

Opens a readable stream for this asset.

Source
to_s(io : IO) : Nil

Streams the content into the given output IO.

Source
to_slice

Returns the full contents as a byte slice.

Source
underlying_io
Source