src/StorageBytes.bend checks
raw source on the hub · import mylsm-lsm-store@0.4.0.0/src/StorageBytes.bend as StorageBytes
2 imports
import Base import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes
Types
type Utf8State source · line 5 · raw
Data
State for the strict single-pass UTF-8 decoder.
Utf8State@need:U32 -> @lo:U32 -> @hi:U32 -> @cp:U32 -> @out:String -> @valid:Bool -> Utf8State
Definitions
def utf8.lead source · line 8 · raw
@+byte:U32 -> @+out:String -> Utf8State
def utf8.cont source · line 28 · raw
@+need:U32 -> @cp:U32 -> @+out:String -> @ok:Bool -> @in_range:Bool -> @byte:U32 -> Utf8State
def utf8.step source · line 37 · raw
@state:Utf8State -> @+byte:U32 -> Utf8State
def utf8.scan.fin.done source · line 46 · raw
@out:String -> @complete:Bool -> Result<&1, &1, Pair(U32, String), String>
def utf8.scan.fin source · line 53 · raw
@state:Utf8State -> Result<&1, &1, Pair(U32, String), String>
def utf8.scan source · line 60 · raw
@remaining:Nat -> @+offset:U32 -> @pair:Pair(Array<U32>, U32) -> @state:Utf8State -> Result<&1, &1, Pair(U32, String), String>
def checked_add source · line 77 · raw
@+left:U32 -> @+right:U32 -> Maybe<&2, U32>
Return None rather than wrapping when U32 addition overflows.
def MAX_BLOCK_BYTES source · line 81 · raw
U32
Normal target size for an encoded storage block or WAL frame.
def MAX_RECORD_BYTES source · line 85 · raw
U32
Hard cap for an individual encoded key or value.
def MAX_MANIFEST_BYTES source · line 89 · raw
U32
Hard cap for the complete serialized Manifest.
def utf8.width source · line 92 · raw
@+scalar:U32 -> U32
def from_string.size source · line 97 · raw
@+text:String -> @+size:U32 -> @fits:Bool -> Maybe<&2, U32>
def from_string.size.begin source · line 112 · raw
@+text:String -> Maybe<&2, U32>
def from_string.checked source · line 121 · raw
@+len:U32 -> @buf:Array<U32> -> Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>
Reject text fields outside the configured storage record cap.
def utf8.put.result source · line 126 · raw
@pair:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor, Bool) -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor
def utf8.put.byte source · line 131 · raw
@cursor:0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor -> @+byte:U32 -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor
def utf8.put.two source · line 134 · raw
@cursor:0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor -> @+scalar:U32 -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor
def utf8.put.three source · line 138 · raw
@cursor:0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor -> @+scalar:U32 -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor
def utf8.put.four source · line 144 · raw
@cursor:0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor -> @+scalar:U32 -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor
def utf8.put.scalar source · line 151 · raw
@cursor:0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor -> @+scalar:U32 -> @ascii:Bool -> @two_byte:Bool -> @three_byte:Bool -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor
def utf8.encode.go source · line 168 · raw
@text:String -> @cursor:0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor
def from_string.output.pair source · line 176 · raw
@result:Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes, U32) -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes
def from_string.output source · line 181 · raw
@+text:String -> @+len:U32 -> 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes
def from_string.preflight source · line 185 · raw
@+text:String -> @size:Maybe<&2, U32> -> Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>
def from_string source · line 193 · raw
@+text:String -> Result<&1, &1, Pair(U32, String), 0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes>
Encode public text at the packed storage boundary.
def decode_checked source · line 197 · raw
@bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> Result<&1, &1, Pair(U32, String), String>
Decode bytes after strict RFC 3629 validation.
def to_string_strict source · line 203 · raw
@bytes:0x185ae03c75e3e75be1171471f68b43cb/bytes.Bytes -> Result<&1, &1, Pair(U32, String), String>
Decode a packed buffer, rejecting malformed UTF-8.
def read_u32be source · line 207 · raw
@cursor:0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor -> Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor, Maybe<&2, U32>)
Read one bounded big-endian u32 through a package cursor.
def write_u32be source · line 211 · raw
@cursor:0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor -> @value:U32 -> Pair(0x185ae03c75e3e75be1171471f68b43cb/bytes.Cursor, Bool)
Write one bounded big-endian u32 through a package cursor.