Home | History | Annotate | Download | only in fst

Lines Matching refs:strm

207   static VectorFstImpl<A> *Read(istream &strm, const FstReadOptions &opts);
324 VectorFstImpl<A> *VectorFstImpl<A>::Read(istream &strm,
328 if (!impl->ReadHeader(strm, opts, kMinFileVersion, &hdr)) {
340 if (!final.Read(strm)) break;
345 ReadType(strm, &narcs);
346 if (!strm) {
354 ReadType(strm, &arc.ilabel);
355 ReadType(strm, &arc.olabel);
356 arc.weight.Read(strm);
357 ReadType(strm, &arc.nextstate);
358 if (!strm) {
446 static VectorFst<A> *Read(istream &strm, const FstReadOptions &opts) {
447 Impl* impl = Impl::Read(strm, opts);
458 virtual bool Write(ostream &strm, const FstWriteOptions &opts) const {
459 return WriteFst(*this, strm, opts);
467 static bool WriteFst(const F &fst, ostream &strm,
534 bool VectorFst<A>::WriteFst(const F &fst, ostream &strm,
542 if (fst.Properties(kExpanded, false) || (start_offset = strm.tellp()) != -1) {
548 FstImpl<A>::WriteFstHeader(fst, strm, opts, kFileVersion, "vector",
553 fst.Final(s).Write(strm);
555 WriteType(strm, narcs);
558 WriteType(strm
559 WriteType(strm, arc.olabel);
560 arc.weight.Write(strm);
561 WriteType(strm, arc.nextstate);
565 strm.flush();
566 if (!strm) {
572 return FstImpl<A>::UpdateFstHeader(fst, strm, opts, kFileVersion, "vector",