Home | History | Annotate | Download | only in fst

Lines Matching refs:strm

90   static ConstFstImpl<A, U> *Read(istream &strm, const FstReadOptions &opts);
204 ConstFstImpl<A, U> *ConstFstImpl<A, U>::Read(istream &strm,
208 if (!impl->ReadHeader(strm, opts, kMinFileVersion, &hdr)) {
220 if ((hdr.GetFlags() & FstHeader::IS_ALIGNED) && !AlignInput(strm)) {
227 impl->states_region_ = MappedFile::Map(&strm, opts, b);
228 if (!strm || impl->states_region_ == NULL) {
235 if ((hdr.GetFlags() & FstHeader::IS_ALIGNED) && !AlignInput(strm)) {
242 impl->arcs_region_ = MappedFile::Map(&strm, opts, b);
243 if (!strm || impl->arcs_region_ == NULL) {
282 static ConstFst<A, U> *Read(istream &strm, const FstReadOptions &opts) {
283 Impl* impl = Impl::Read(strm, opts);
294 virtual bool Write(ostream &strm, const FstWriteOptions &opts) const {
295 return WriteFst(*this, strm, opts);
303 static bool WriteFst(const F &fst, ostream &strm,
343 bool ConstFst<A, U>::WriteFst(const F &fst, ostream &strm,
354 } else if ((start_offset = strm.tellp()) == -1) {
376 FstImpl<A>::WriteFstHeader(fst, strm, opts, file_version, type, properties,
378 if (opts.align && !AlignOutput(strm)) {
390 strm.write(reinterpret_cast<const char *>(&state), sizeof(state));
396 if (opts.align && !AlignOutput(strm)) {
403 strm.write(reinterpret_cast<const char *>(&arc), sizeof(arc));
406 strm.flush();
407 if (!strm) {
412 return FstImpl<A>::UpdateFstHeader(fst, strm, opts, file_version, type,