static int write(bool value, Uint8List buf) { buf.setAll(0, [value ? 1 : 0]); return allocationSize(); }