FST(INPUT_TYPE inputType, Outputs<T> outputs, int bytesPageBits) { this.inputType = inputType; this.outputs = outputs; version = VERSION_CURRENT; bytesArray = null; bytes = new BytesStore(bytesPageBits); // pad: ensure no node gets address 0 which is reserved to mean // the stop state w/ no arcs bytes.writeByte((byte) 0); emptyOutput = null; }
BytesStore emptyBytes = new BytesStore(10); int numBytes = in.readVInt(); emptyBytes.copyBytes(in, numBytes); if (numBytes > 1 << maxBlockBits) { bytes = new BytesStore(in, numBytes, 1<<maxBlockBits); bytesArray = null; } else {
private FST(INPUT_TYPE inputType, Outputs<T> outputs, int bytesPageBits) { version = VERSION_CURRENT; packed = true; this.inputType = inputType; bytesArray = null; bytes = new BytesStore(bytesPageBits); this.outputs = outputs; }
private FST(INPUT_TYPE inputType, Outputs<T> outputs, int bytesPageBits) { version = VERSION_CURRENT; packed = true; this.inputType = inputType; bytesArray = null; bytes = new BytesStore(bytesPageBits); this.outputs = outputs; }
FST(INPUT_TYPE inputType, Outputs<T> outputs, int bytesPageBits) { this.inputType = inputType; this.outputs = outputs; version = VERSION_CURRENT; bytesArray = null; bytes = new BytesStore(bytesPageBits); // pad: ensure no node gets address 0 which is reserved to mean // the stop state w/ no arcs bytes.writeByte((byte) 0); emptyOutput = null; }
FST(INPUT_TYPE inputType, Outputs<T> outputs, boolean willPackFST, float acceptableOverheadRatio, int bytesPageBits) { this.inputType = inputType; this.outputs = outputs; version = VERSION_CURRENT; bytesArray = null; bytes = new BytesStore(bytesPageBits); // pad: ensure no node gets address 0 which is reserved to mean // the stop state w/ no arcs bytes.writeByte((byte) 0); if (willPackFST) { nodeAddress = new GrowableWriter(15, 8, acceptableOverheadRatio); inCounts = new GrowableWriter(1, 8, acceptableOverheadRatio); } else { nodeAddress = null; inCounts = null; } emptyOutput = null; packed = false; nodeRefToAddress = null; }
FST(INPUT_TYPE inputType, Outputs<T> outputs, boolean willPackFST, float acceptableOverheadRatio, int bytesPageBits) { this.inputType = inputType; this.outputs = outputs; version = VERSION_CURRENT; bytesArray = null; bytes = new BytesStore(bytesPageBits); // pad: ensure no node gets address 0 which is reserved to mean // the stop state w/ no arcs bytes.writeByte((byte) 0); if (willPackFST) { nodeAddress = new GrowableWriter(15, 8, acceptableOverheadRatio); inCounts = new GrowableWriter(1, 8, acceptableOverheadRatio); } else { nodeAddress = null; inCounts = null; } emptyOutput = null; packed = false; nodeRefToAddress = null; }
BytesStore emptyBytes = new BytesStore(10); int numBytes = in.readVInt(); emptyBytes.copyBytes(in, numBytes); if (numBytes > 1 << maxBlockBits) { bytes = new BytesStore(in, numBytes, 1<<maxBlockBits); bytesArray = null; } else {
BytesStore emptyBytes = new BytesStore(10); int numBytes = in.readVInt(); emptyBytes.copyBytes(in, numBytes); if (numBytes > 1 << maxBlockBits) { bytes = new BytesStore(in, numBytes, 1<<maxBlockBits); bytesArray = null; } else {
BytesStore emptyBytes = new BytesStore(10); int numBytes = in.readVInt(); emptyBytes.copyBytes(in, numBytes); if (numBytes > 1 << maxBlockBits) { bytes = new BytesStore(in, numBytes, 1<<maxBlockBits); bytesArray = null; } else {