module

Xerp::Util

Class methods

decode_delta_u32_list(blob : Bytes) : Array(Int32)

Decodes a delta-encoded varint blob back to an array of line numbers.

Source
decode_u32_list(blob : Bytes) : Array(Int32)

Decodes a varint blob to an array of Int32 values (no delta encoding).

Source
decode_u64(io : IO) : UInt64

Decodes a variable-length integer (LEB128 unsigned) from IO.

Source
encode_delta_u32_list(lines : Array(Int32)) : Bytes

Encodes an array of line numbers as delta-encoded varints. Lines must be sorted in ascending order.

Source
encode_u32_list(values : Array(Int32)) : Bytes

Encodes an array of UInt32 values as varints (no delta encoding).

Source
encode_u64(io : IO, value : UInt64) : Nil

Encodes a UInt64 as a variable-length integer (LEB128 unsigned).

Source
hash_content(content : String) : String

Hashes file content for change detection.

Source
hash_query(normalized : String) : String

Hashes a normalized query string for stable identification.

Source
hash_result(rel_path : String, line_start : Int32, line_end : Int32, content_hash : String) : String

Generates a stable result ID from block location and content hash. This ID remains stable as long as the block content doesn't change.

Source
now_iso8601_utc

Returns the current UTC time in ISO 8601 format.

Source