topspeed 0.2.0
topspeed: ^0.2.0 copied to clipboard
Pure Dart reader and writer for Clarion TopSpeed (.tps) database files: tables, keys, MEMO/BLOB, code pages and encrypted files. No native code.
0.2.0 #
TpsReaderreads large files a few pages at a time instead of loading them into memory. It finds rows through the page tree, so index entries are never read. It offersrowCount(from metadata),rows()(lazy, withfromRecord),row(n), MEMO and BLOB values, encrypted files andchangedOnDisk. It is read-only.TpsByteSourceis the bytes behind a reader.TpsMemorySourceworks on every platform. The new librarypackage:topspeed/topspeed_io.dartaddsTpsFileSource, which reads a file on disk.- On a 52 MB real file with 100,960 rows and 28 keys, a full scan takes
under a second with about 50 MB peak memory, against about 580 MB for
TpsFile.parse. One row lookup takes about 0.1 ms. - Breaking:
TpsRow.tableis now aTpsTableInfo(number, name and definition), so rows fromTpsFileandTpsReadershare one type. Code that calledrow.table.insert(...)must keep its ownTpsTable. - New tool:
tool/tps_stream_bench.dart.
0.1.0 #
First public release.
- Read Clarion TopSpeed (
.tps) files: header, B+tree pages, RLE page compression, several tables per file, multi-block table definitions. - Field types BYTE, SHORT, USHORT, LONG, ULONG, SREAL, REAL, DECIMAL, DATE,
TIME, STRING, CSTRING, PSTRING, PICTURE, GROUP, and
DIMarrays. Unknown type codes are returned as raw bytes and do not stop the file from loading. - MEMO and BLOB values, assembled from their blocks.
- Code pages:
windows1252(default),cp850,cp437, or anyEncoding. - Encrypted files (
OWNERpassword): read, and written back encrypted. - Write support:
insert,update,delete, with key rebuilding (DUP, OPT, NOCASE, descending parts), unique key checks and metadata counts.indexesVerifiedtells whether writing a given file is safe. - Recovery mode: a damaged page tree is read by scanning leaf pages (read-only).
- Helpers for Clarion standard dates and times kept in
LONGfields.