import { BGFBReader } from "./BGFBReader";
import { BGFBWriter } from "./BGFBWriter";
/**
 * Top level entries to convert between GeometryQuery types and FlatBuffer Bytes.
 * @public
 */
export class BentleyGeometryFlatBuffer {
    constructor() { }
    /**
     * Serialize bytes to a flatbuffer.
     * @public
     */
    static geometryToBytes(data, addVersionSignature = false) {
        return BGFBWriter.geometryToBytes(data, addVersionSignature ? signatureBytes : undefined);
    }
    /**
     * Deserialize bytes from a flatbuffer.
     *  @public
     * @param justTheBytes FlatBuffer bytes as created by BGFBWriter.createFlatBuffer (g);
     */
    static bytesToGeometry(justTheBytes, hasVersionSignature = false) {
        return BGFBReader.bytesToGeometry(justTheBytes, hasVersionSignature ? signatureBytes : undefined);
    }
}
/** "bg0001fb" header, persisted in iModel FB geometry streams */
const signatureBytes = new Uint8Array([98, 103, 48, 48, 48, 49, 102, 98]);
//# sourceMappingURL=BentleyGeometryFlatBuffer.js.map