MCPcopy Create free account
hub / github.com/creatale/node-dv / Serialize

Method Serialize

deps/tesseract/ccstruct/imagedata.cpp:83–88  ·  view source on GitHub ↗

Writes to the given file. Returns false in case of error.

Source from the content-addressed store, hash-verified

81
82// Writes to the given file. Returns false in case of error.
83bool WordFeature::Serialize(FILE* fp) const {
84 if (fwrite(&x_, sizeof(x_), 1, fp) != 1) return false;
85 if (fwrite(&y_, sizeof(y_), 1, fp) != 1) return false;
86 if (fwrite(&dir_, sizeof(dir_), 1, fp) != 1) return false;
87 return true;
88}
89// Reads from the given file. Returns false in case of error.
90// If swap is true, assumes a big/little-endian swap is needed.
91bool WordFeature::DeSerialize(bool swap, FILE* fp) {

Callers 2

SaveDocumentMethod · 0.45
SaveToBufferMethod · 0.45

Calls 2

FWriteMethod · 0.80
SerializeClassesMethod · 0.45

Tested by

no test coverage detected