// automatically generated by the FlatBuffers compiler, do not modify /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */ import * as flatbuffers from 'flatbuffers'; /** * Logically the same as Utf8, but the internal representation uses a view * struct that contains the string length and either the string's entire data * inline (for small strings) or an inlined prefix, an index of another buffer, * and an offset pointing to a slice in that buffer (for non-small strings). * * Since it uses a variable number of data buffers, each Field with this type * must have a corresponding entry in `variadicBufferCounts`. */ export class Utf8View { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; __init(i:number, bb:flatbuffers.ByteBuffer):Utf8View { this.bb_pos = i; this.bb = bb; return this; } static getRootAsUtf8View(bb:flatbuffers.ByteBuffer, obj?:Utf8View):Utf8View { return (obj || new Utf8View()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static getSizePrefixedRootAsUtf8View(bb:flatbuffers.ByteBuffer, obj?:Utf8View):Utf8View { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); return (obj || new Utf8View()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } static startUtf8View(builder:flatbuffers.Builder) { builder.startObject(0); } static endUtf8View(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; } static createUtf8View(builder:flatbuffers.Builder):flatbuffers.Offset { Utf8View.startUtf8View(builder); return Utf8View.endUtf8View(builder); } }