/* Open a gzlog object, creating the log file if it does not exist. Return NULLonerror.Notethatgzlog_open()couldtakeawhiletocompleteifit hastowaittoverifythatalockisstale(possiblyforfiveminutes),or ifthereissignificantcontentionwithotherinstantiationsofthisobject whenlockingtheresource.pathistheprefixofthefilenamescreatedby thisobject.Ifpathis"foo",thenthelogfilewillbe"foo.gz",and otherauxiliaryfileswillbecreatedanddestroyedduringtheprocess: "foo.dict"foracompressiondictionary,"foo.temp"foratemporary(next) dictionary,"foo.add"fordatabeingaddedorcompressed,"foo.lock"forthe lockfile,and"foo.repairs"tologrecoveryoperationsperformeddueto interruptedgzlogoperations.Agzlog_open()followedbyagzlog_close()
will recover a previously interrupted operation, if any. */
gzlog *gzlog_open(char *path);
/* Write to a gzlog object. Return zero on success, -1 if there is a file i/o erroronanyofthegzlogfiles(thisshouldnothappenifgzlog_open() succeeded,unlessthedevicehasrunoutofspaceorleftoverauxiliary fileshavepermissionsorownershipthatpreventtheiruse),-2ifthereis amemoryallocationfailure,or-3ifthelogargumentisinvalid(e.g.if itwasnotcreatedbygzlog_open()).Thisfunctionwillwritedatatothe fileuncompressed,until1MBhasbeenaccumulated,atwhichtimethatdata willbecompressed.Thelogfilewillbeavalidgzipfileuponsuccessful
return. */ int gzlog_write(gzlog *log, void *data, size_t len);
/* Force compression of any uncompressed data in the log. This should be used sparingly,ifatall.Themainapplicationwouldbewhenalogfilewill notbeappendedtoagain.Ifthisisusedtocompressfrequentlywhile appending,itwillbothsignificantlyincreasetheexecutiontimeand reducethecompressionratio.Thereturncodesarethesameasfor
gzlog_write(). */ int gzlog_compress(gzlog *log);
/* Close a gzlog object. Return zero on success, -3 if the log argument is
invalid. The log object is freed, and so cannot be referenced again. */ int gzlog_close(gzlog *log);
#endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-17)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.