-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Structured Append #132
base: master
Are you sure you want to change the base?
Structured Append #132
Conversation
Here's some open questions:
|
…rite "M/N" page numberings. Some of the output.jsons were hand-massaged to be what they should be, rather than what generate-test-data currently would give, because this feature doesn't work yet. amen.mp3 is public domain from https://sampleswap.org//samples-ghost/DRUM%20LOOPS%20and%20BREAKS/161%20to%20180%20bpm/128[kb]161_amenvar3.aif.mp3
It's important that this is done sync, not async, because there's a stateful part that places parts into an array by their page number, and if the separate subparts run async from each other the ordering gets messed up.
- I remembered that the parity byte exists, so I test that too - bumped the output data down into a sub-member (result.structuredAppend.{M,N,parity}) and gave it a TypeScript type - bumped M and N up to be 1-based, following the QR spec
The assert line is weird. In structured-append-test.ts I can use ``` import { strict as assert } from 'assert'; ``` But here I can't and I have to use ``` import * as assert from 'assert'; ``` (ref: https://stackoverflow.com/questions/39883960/what-is-the-typescript-2-0-es2015-way-to-import-assert-from-node-js) Oh well??
As you can see from the diff, this only adds missing byte chunks and the new structured append chunks, plus 15 newly passing tests :) Previously, in 7d113b2, I had generated the expected output using https://github.com/glassechidna/zxing-cpp/. Now, the expected output was made by jsQR. The fact that the diff shows no change in that part of the output.jsons means this feature branch is correct :)
Another issue: if I try to use
But this doesn't happen if I just |
Fixes #128 .