Bakelite::FileIO
High-performance, read-only streaming IO implementation for Bakelite stored assets. Decompresses chunks on demand into a single active sliding buffer, ensuring peak memory usage remains strictly O(chunk_size) regardless of file size.
Constructors
Instance methods
closed?
Returns true if this IO is closed.
IO defines returns false, but including types may override.
compression
Sourcepos
Returns the current position (in bytes) in this IO.
The IO class raises on this method, but some subclasses, notable
IO::FileDescriptor and IO::Memory implement it.
File.write("testfile", "hello")
file = File.new("testfile")
file.pos # => 0
file.gets(2) # => "he"
file.pos # => 2
Reads up to slice.size bytes into slice. Returns number of bytes read (0 on EOF).
Seeking support: Set, Current, or End
size
Source