Setting the file. One moment.
Chapter 06 · Clickhouse Js Node Rowbinary
Subchapter 6.27
src/readers/bool.ts
TypeScript10 lines282 B
import { Cursor } from "./core.js";
import { readUInt8 } from "./integers.js";
/**
* Read a `Bool`: 1 byte, stored as `UInt8` (`0` = false, `1` = true). Treats any
* non-zero byte as true.
*/
export function readBool(state: Cursor): boolean {
return readUInt8(state) !== 0;
}