def append.chunked.cloned

mylsm-lsm-store@0.6.0.1 · src/ByteWalIo.bend:569

import mylsm-lsm-store@0.6.0.1/src/ByteWalIo.bend as ByteWalIo
import Base
import bend-kit-bytes@0.3.2.0/bytes.bend as Bytes

569# Splits duplicated frame buffers around one bounded WAL write chunk.
570def append.chunked.cloned(
571  file: File,
572  sources: Bytes.Bytes & Bytes.Bytes,
573  total: U32,
574  +path: String
575) -> IO(Result<&1, &1, U32 & String, Unit>):
576  match sources:
577    case (first_source, rest_source):
578      append.chunked.rest(file,
579        append.slice(Bytes.slice(first_source, 0, 65536)),
580        append.slice(Bytes.slice(rest_source, 65536,
581          (total - 65536 : U32))), path)

Uses (13)

Used by (1)