Repository navigation
SequentialZfpCompression v0.2.0
I fixed a major bug with this version which introduced a breaking change. The multifile compressor worked fine and the files it created were deleted when julia was closed, but if it went out of scope it did let the garbage collector to delete the files. This created a problem that if your disk got full, the decompressed arrays would have NaN numbers inside. I added a finalizer to hint the garbage collector to do just that and also added a function called cleanup! to mannually delete the files.
Here are the details:
CompressedMultiFileArraySeq now has a finalizer that automatically deletes its backing temp files when GC'd (src/multifile.jl:111). Previously, files persisted after the object was collected.
Any user code that relied on the temp files surviving the compressor's lifetime would silently break.
Additive / non-breaking changes:
- New type CompressedMmapArraySeq + refreshMmaps! export
- New cleanup! for both file-backed types
- New SeqCompressor kwargs: mmap=false, nthreads=-1, nt=1 — all have defaults, so existing call sites are unaffected
- append! and totalsize broadened to AbstractFileBackedArraySeq dispatch — same behavior for existing types
One thing to double-check: src/multifile.jl:110-112 — the custom inner constructor no longer has an explicit return obj. It's fine because finalizer(f, obj) returns obj in Julia, so the
constructor implicitly returns correctly, but it's easy to misread.
Merged pull requests:
- Fixing bug where files were not deleted after GC (#9) (@AtilaSaraiva)
- bumping version (#10) (@AtilaSaraiva)
- Mmap compressor (#11) (@AtilaSaraiva)
- removing unecessary export of the CompressedMmapArraySeq (#12) (@AtilaSaraiva)