Compress, encrypt, decrypt, and say what a file allows - #5
Merged
Conversation
Four verbs the reader has been able to support since it learned to encrypt on writing, and which nothing was offering. Compress packs the objects into compressed streams and a cross-reference stream, which is what every writer since 2003 does. Over the whole corpus: 118 833 of 118 833 files come out with the same pages, 118 746 of them smaller, 35.2 GB down to 33.6 GB — 95.4% of what they were. Encrypt protects the file that will be written, with either the current method or the one readers from before 2008 understand. Decrypt writes it back out without protection. Protection says how the file that was read was protected, which is what the new permissions verb prints: the method in words, which password opened it, and what it allows. The whole corpus goes through all three: 118 833 files compressed and read back with the pages byte for byte the same, 118 833 encrypted and refused without a password and opened by both of them, 118 833 decrypted back to the pages they started as. Nothing failed and nothing panicked.
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.
Four verbs the reader has been able to support since it learned to encrypt on writing, and which nothing was offering.
and on the command line:
Measured on the whole corpus, on the pages rather than the exit status
Every file is opened, written, compressed and read back; then encrypted, reopened with each password, and written out plain again. What is compared at every step is a hash of what every page says.
Nothing failed, nothing panicked, and no page changed by a byte at any step.
Needs
readerv0.4.0 forDocument.Protection. 100% statement coverage,go vetand gofmt clean.