Repository navigation
Conversation
… back-references * CvfLzCodec (DS-0-x, JM-0-x, SQ-0-0 and the Stacker dispatch) is replaced by an independent implementation (MsdblLzCodec + ClusterMatchFinder) written from docs/CVF-CODECS-ON-DISK.md and the dmsdos reference vectors. Public API unchanged; CvfLzMethod moves to its own file. Clean-room reimplementation from docs/CVF-CODECS-ON-DISK.md; the implementer did not read the previous code or dmsdos sources (rung 3/4 spec + black-box oracle). * The DS/JM encoder now writes a sync after every 512 decoded bytes and never lets a match cross a 512-byte boundary - measured in all 16 dmsdos DS/JM reference streams and recorded in the spec. A sync followed only by zero padding ends a short cluster (tail reads zero). * Auto in the codec keeps the smaller of DS and JM; GenuineDvr3Writer's Auto also tries SQ. + Sd4Codec rewritten from the spec: the encoder emits short/long matches with every length extension and run-coded code-length tables, codes built by package-merge (optimal, complete, 15-bit limit). Within 10% of the dmsdos SD-4 encoder on the five reference samples; dmsdos reads our SD-4 volumes (and 15-bit-deep main codes) byte-exact. + BB_StackerSd4 building block. # Stacker: a compressed run that needs every sector of its cluster reads as stored (AMAP has no flag for it), so ForceCompress wrote clusters dmsdos and our reader returned verbatim. Such a cluster is now stored raw; verified by dmsdos and our reader. + DmsdosOracle: the dmsdos gates run through WSL on Windows as well as natively on Linux; the existing Stacker/DriveSpace 3/DoubleSpace driver-proof tests use it. + Boundary tests for every CVF codec: empty/1-byte clusters, 512/8K/32K clusters, incompressible data, maximum match lengths and distances, malformed streams. ! Fragmented DriveSpace 3 clusters and fragmented/suballocated Stacker clusters are still refused; they follow in a separate change.
GenuineStackerReader refused every fragmented cluster (AMAP bit 7 set, run shorter than the cluster). The layout is now read: the AMAP run is the first piece, its first sector carries 0xED, the number of further pieces, their summed sector count minus one, and 4-byte entries (16-bit sector, sectors - 1, a fourth byte); the compressed payload starts after the entries and continues through the pieces. An entry whose fourth byte is non-zero is refused - its meaning was never observed. Rung 4/5 by measurement: no specification or sample volume exists, so candidate layouts were built and dmsdos (run only as a black box, its source not read) judged them through dcread. Six accepted shapes (one to three further pieces, SD-3 and SD-4 payloads) are kept as DriverProof tests, and a wrong piece total is refused by dmsdos and by us alike. Recorded in docs/CVF-CODECS-ON-DISK.md. ! Stacker suballocated clusters and DriveSpace 3 fragmented clusters stay refused: no layout measured.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #501: the first commit of this branch is #501's content (cherry-picked onto current main); review only the second commit. Merge after #501.
What changed
GenuineStackerReaderreads fragmented Stacker clusters instead of refusing them. The AMAP run is the first piece; its first sector holds0xED, the number n of further pieces, their summed sector count minus one (16-bit LE), and n 4-byte entries (16-bit sector, sectors − 1, a fourth byte). The compressed payload starts at byte 4 + 4·n and continues through the pieces in order.NotSupportedException), because no volume with that byte set was observed. A wrong piece total, a missing0xEDor a piece past the volume end is rejected (InvalidDataException).docs/CVF-CODECS-ON-DISK.mdas measured. Stacker FORMAT-NOTES updated.How the layout was established
There is no specification or sample volume. I built candidate volumes and ran dmsdos
dcreadon them in WSL, only as a black box (its source was not read). Six rounds of trial volumes narrowed the layout to the one above;dcreadreads every accepted shape byte-exact and rejects a wrong piece total as "sector count mismash".Verification
StackerFragmentedClusterTests: our reader and dmsdos both read six shapes byte-exact (SD-3/SD-4 payloads, two/three/four pieces, one- and two-sector first runs). dmsdos and our reader both refuse a wrong piece total. Malformed-list cases are covered.Stacker+Compression.Tests.Cvf: 720 passed, 3 skipped (Windows + WSL dmsdos).