infrastructure/native/bindings/ffi_buffer_helper
library
Functions
-
callWithBuffer(BufferCallback fn, {int? maxSize, int? initialSize, bool preferTransient = false, bool? allowZeroCopy})
→ Uint8List?
-
Calls a buffer callback function with dynamically sized buffers.
-
materializeFfiBytes(Pointer<Uint8> buf, int length, {required bool transferOwnership, required bool allowZeroCopy})
→ Uint8List
-
Materializes FFI bytes using the same zero-copy policy as callWithBuffer.
-
preferTransientFfiBufferForParams(Uint8List params)
→ bool
-
When true, skip the reusable scratch pool so large sync param queries can
return zero-copy result views without an extra scratch→owned copy.
-
resetZeroCopyResultBufferBindingForTest()
→ void
-
Clears cached zero-copy bindings (tests only).
-
streamCallWithBuffer(StreamBufferCallback fn, {int? maxSize, int? initialSize})
→ StreamBufferFetchResult?
-
Like callWithBuffer for stream fetch callbacks that also return hasMore.