module

VirtualFs::PakFormat

Constants

FLAG_DATA_COMPRESSED = 1_u64

Package-level flags (bitfield in header)

FLAG_DATA_ENCRYPTED = 2_u64
FLAG_DEDUP = 16_u64
FLAG_INDEX_COMPRESSED = 4_u64
FLAG_INDEX_ENCRYPTED = 8_u64
HEADER_SIZE = 128
KNOWN_FLAGS = (FLAG_DATA_COMPRESSED | FLAG_DATA_ENCRYPTED) | FLAG_DEDUP

Flags this version understands

MAGIC = "VPK1\u0000\u0000\u0000\u0000"
MAX_FILES = 1000000_u64
TOOL_VERSION = begin parts = VirtualFs::VERSION.split('.') (((parts[0].to_i * 10000) + (parts[1].to_i * 100)) + parts[2].to_i).to_u32 end

Tool/library version (encoded from VirtualFs::VERSION)

VERSION = 1_u32

Current format version

Class methods

build(path : String, *, package_id : String = "", chunk_size : Int32 = 262144, key_provider : Crypto::KeyProvider | Nil = nil, cipher : String = "aes-256-gcm", & : Builder -> ) : Nil
Source
info(path : String | Path) : PakInfo
Source
load_entry_data(entry : PakEntry) : Bytes
Source
read_blob(io : IO, entry : Index::Entry, offset : Int64, length : Int32 | Nil) : Bytes
Source
read_index(file : IO, pak_file_size : Int64) : Index
Source
read_index(path : String) : Index
Source
verify(pak_path : String) : Bool
Source
write(path : String, entries : Array(PakEntry), *, package_id : String = "", chunk_size : Int32 = 262144, key_provider : Crypto::KeyProvider | Nil = nil, cipher : String = "aes-256-gcm") : Nil
Source

Nested types