diff --git a/src/decoder/decodeData/index.ts b/src/decoder/decodeData/index.ts index 4ca067ea..282ca037 100644 --- a/src/decoder/decodeData/index.ts +++ b/src/decoder/decodeData/index.ts @@ -1,12 +1,23 @@ // tslint:disable:no-bitwise +import * as assert from "assert"; import { BitStream } from "./BitStream"; import { shiftJISTable } from "./shiftJISTable"; +export interface StructuredAppendTag { + M: number; + N: number; + parity: number; +} + export interface Chunk { type: Mode; text: string; } +export interface StructuredAppendChunk extends StructuredAppendTag { + type: Mode.StructuredAppend; +} + export interface ByteChunk { type: Mode.Byte | Mode.Kanji; bytes: number[]; @@ -17,17 +28,19 @@ export interface ECIChunk { assignmentNumber: number; } -export type Chunks = Array; +export type Chunks = Array; export interface DecodedQR { text: string; bytes: number[]; chunks: Chunks; + structuredAppend?: StructuredAppendTag; } export enum Mode { Numeric = "numeric", Alphanumeric = "alphanumeric", + StructuredAppend = "structuredappend", Byte = "byte", Kanji = "kanji", ECI = "eci", @@ -37,10 +50,10 @@ enum ModeByte { Terminator = 0x0, Numeric = 0x1, Alphanumeric = 0x2, + StructuredAppend = 0x3, Byte = 0x4, Kanji = 0x8, ECI = 0x7, - // StructuredAppend = 0x3, // FNC1FirstPosition = 0x5, // FNC1SecondPosition = 0x9, } @@ -223,6 +236,26 @@ export function decode(data: Uint8ClampedArray, version: number): DecodedQR { type: Mode.Alphanumeric, text: alphanumericResult.text, }); + } else if (mode === ModeByte.StructuredAppend) { + // QR Standard section 9.2: + // > The 4-bit patterns shall be the binary equivalents of (m - 1) and (n - 1) respectively. + const structuredAppend: StructuredAppendTag = { + M: stream.readBits(4) + 1, + N: stream.readBits(4) + 1, + parity: stream.readBits(8), + }; + // QR codes sometimes contain duplicate Structured Append tags for redundancy. + // If they exist, they are all supposed to be equal. This checks for that: + if (typeof result.structuredAppend === "undefined") { + result.structuredAppend = structuredAppend; + } else { + // TODO: should this really be an assert? If the user has a corrupt QR code they probably still want to try to read it. + assert.deepStrictEqual(structuredAppend, result.structuredAppend, "QR Code contains inconsistent Structured Append tags."); + } + result.chunks.push({ + type: Mode.StructuredAppend, + ...result.structuredAppend, + }); } else if (mode === ModeByte.Byte) { const byteResult = decodeByte(stream, size); result.text += byteResult.text; diff --git a/src/index.ts b/src/index.ts index 65116049..1a851883 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,6 +1,6 @@ import {binarize} from "./binarizer"; import {BitMatrix} from "./BitMatrix"; -import {Chunks} from "./decoder/decodeData"; +import {Chunks, StructuredAppendTag} from "./decoder/decodeData"; import {decode} from "./decoder/decoder"; import {extract} from "./extractor"; import {locate, Point} from "./locator"; @@ -9,6 +9,7 @@ export interface QRCode { binaryData: number[]; data: string; chunks: Chunks; + structuredAppend?: StructuredAppendTag; location: { topRightCorner: Point; topLeftCorner: Point; @@ -39,6 +40,7 @@ function scan(matrix: BitMatrix): QRCode | null { binaryData: decoded.bytes, data: decoded.text, chunks: decoded.chunks, + structuredAppend: decoded.structuredAppend, location: { topRightCorner: extracted.mappingFunction(location.dimension, 0), topLeftCorner: extracted.mappingFunction(0, 0), diff --git a/tests/amen.mp3 b/tests/amen.mp3 new file mode 100644 index 00000000..244afc3b Binary files /dev/null and b/tests/amen.mp3 differ diff --git a/tests/end-to-end/report.json b/tests/end-to-end/report.json index 24fb4f5b..14152bcc 100644 --- a/tests/end-to-end/report.json +++ b/tests/end-to-end/report.json @@ -1,7 +1,7 @@ { "counts": { "failed": 47, - "successful": 207 + "successful": 222 }, "tests": { "0": true, @@ -245,6 +245,21 @@ "stickerbook-4": true, "stickerbook-5": true, "stickerbook-6": false, + "structured-append-01": true, + "structured-append-02": true, + "structured-append-03": true, + "structured-append-04": true, + "structured-append-05": true, + "structured-append-06": true, + "structured-append-07": true, + "structured-append-08": true, + "structured-append-09": true, + "structured-append-10": true, + "structured-append-11": true, + "structured-append-12": true, + "structured-append-13": true, + "structured-append-14": true, + "structured-append-15": true, "subway-station": false, "tattoo-scan": true, "trackable-book-1": false, diff --git a/tests/end-to-end/structured-append-01/input.png b/tests/end-to-end/structured-append-01/input.png new file mode 100644 index 00000000..a701f642 Binary files /dev/null and b/tests/end-to-end/structured-append-01/input.png differ diff --git a/tests/end-to-end/structured-append-01/output.json b/tests/end-to-end/structured-append-01/output.json new file mode 100644 index 00000000..cb1f9f54 --- /dev/null +++ b/tests/end-to-end/structured-append-01/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 255, + 243, + 128, + 196, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 88, + 105, + 110, + 103, + 0, + 0, + 0, + 15, + 0, + 0, + 0, + 60, + 0, + 0, + 32, + 235, + 0, + 4, + 13, + 13, + 17, + 17, + 21, + 25, + 25, + 29, + 29, + 34, + 37, + 37, + 42, + 42, + 45, + 49, + 49, + 53, + 53, + 56, + 60, + 60, + 64, + 64, + 70, + 75, + 75, + 79, + 79, + 83, + 86, + 86, + 90, + 90, + 94, + 104, + 104, + 114, + 114, + 117, + 121, + 121, + 125, + 125, + 129, + 132, + 132, + 136, + 136, + 140, + 144, + 144, + 148, + 148, + 152, + 155, + 155, + 159, + 159, + 163, + 167, + 167, + 172, + 172, + 176, + 181, + 181, + 185, + 185, + 189, + 193, + 193, + 198, + 198, + 202, + 205, + 205, + 209, + 209, + 213, + 217, + 217, + 221, + 221, + 226, + 229, + 229, + 233, + 233, + 237, + 241, + 241, + 245, + 245, + 249, + 255, + 255, + 255, + 0, + 0, + 0, + 57, + 76, + 65, + 77, + 69, + 51, + 46, + 57, + 57, + 114, + 2, + 105, + 0, + 0, + 0, + 0, + 46, + 46, + 0, + 0, + 20, + 40, + 36, + 4, + 31, + 66, + 0, + 0, + 40, + 0, + 0, + 32, + 235, + 56, + 85, + 255, + 236, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 255, + 243, + 80, + 196, + 0, + 24, + 155, + 30, + 164, + 1, + 67, + 40, + 0, + 46, + 187, + 185, + 253, + 119, + 115, + 230, + 224, + 2, + 19, + 244, + 220, + 56, + 28, + 35, + 116, + 33, + 206, + 115, + 191, + 232, + 66, + 103, + 57, + 9, + 83, + 156, + 249, + 222, + 132, + 33, + 50, + 16, + 132, + 20, + 33, + 27, + 144, + 132, + 33, + 27, + 161, + 8, + 79, + 212, + 231, + 58, + 16, + 62, + 1, + 128, + 97, + 240, + 248, + 187, + 161, + 3, + 225, + 243, + 191, + 252, + 231, + 59, + 255, + 242, + 16, + 132, + 243, + 188, + 132, + 33, + 42, + 66, + 16, + 132, + 33, + 9, + 245, + 57, + 222, + 115, + 156, + 231, + 57, + 206, + 255, + 206, + 113, + 64, + 65, + 192, + 248, + 62, + 8, + 2, + 25, + 127, + 242, + 138, + 4, + 1, + 33, + 0, + 16, + 64, + 9, + 1, + 102, + 142, + 34, + 32, + 70, + 51, + 42, + 18, + 127, + 70, + 255, + 243, + 160, + 196, + 18, + 70, + 92, + 22, + 176, + 213, + 153, + 192, + 0, + 127, + 166, + 2, + 176, + 37, + 0, + 161, + 160, + 101, + 203, + 0, + 10, + 138, + 2, + 124, + 238, + 44, + 42, + 16, + 20, + 37, + 238, + 68, + 82, + 235, + 151, + 29, + 18, + 145, + 192, + 2, + 6, + 158, + 135, + 128, + 176, + 130, + 208, + 206, + 24, + 33, + 168, + 169, + 80, + 166, + 99, + 245, + 148, + 178, + 196, + 84, + 119, + 40, + 225, + 227, + 10, + 150, + 243, + 178, + 221, + 209, + 33, + 249, + 197, + 204, + 70, + 122, + 6, + 51, + 37, + 106, + 98, + 17, + 37, + 91, + 235, + 102, + 24, + 83, + 120, + 252, + 62, + 243, + 202, + 226, + 214, + 227, + 49, + 205, + 66, + 94, + 102, + 101, + 23, + 142, + 180, + 153, + 36, + 223, + 37, + 245, + 109, + 103, + 45, + 173, + 186, + 149, + 97, + 170, + 29, + 214, + 138, + 54, + 40, + 118, + 25, + 127, + 169, + 229, + 146, + 154, + 104, + 205, + 52, + 178, + 49, + 79, + 95, + 146, + 106, + 178, + 27, + 178, + 150, + 125, + 22, + 185, + 39, + 198, + 204, + 204, + 171, + 26, + 251, + 149, + 71, + 101, + 216, + 88, + 141, + 75, + 167, + 249, + 132, + 162, + 154, + 247, + 55, + 77, + 30, + 185, + 87, + 234, + 202, + 173, + 208, + 87, + 144, + 74, + 39, + 229, + 18, + 167, + 238, + 43, + 106, + 228, + 166, + 93, + 45, + 131, + 49, + 189, + 107, + 147, + 52, + 87, + 111, + 86, + 251, + 152, + 212, + 213, + 220, + 45, + 103, + 99, + 47, + 185, + 106, + 190, + 24, + 214, + 166, + 164, + 179, + 190, + 234, + 173, + 185, + 158, + 218, + 153, + 126, + 109, + 231, + 87, + 233, + 168, + 49, + 194, + 174, + 117, + 113, + 203, + 238, + 103, + 77, + 102, + 245, + 205, + 225, + 173 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 1, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 255, + 243, + 128, + 196, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 88, + 105, + 110, + 103, + 0, + 0, + 0, + 15, + 0, + 0, + 0, + 60, + 0, + 0, + 32, + 235, + 0, + 4, + 13, + 13, + 17, + 17, + 21, + 25, + 25, + 29, + 29, + 34, + 37, + 37, + 42, + 42, + 45, + 49, + 49, + 53, + 53, + 56, + 60, + 60, + 64, + 64, + 70, + 75, + 75, + 79, + 79, + 83, + 86, + 86, + 90, + 90, + 94, + 104, + 104, + 114, + 114, + 117, + 121, + 121, + 125, + 125, + 129, + 132, + 132, + 136, + 136, + 140, + 144, + 144, + 148, + 148, + 152, + 155, + 155, + 159, + 159, + 163, + 167, + 167, + 172, + 172, + 176, + 181, + 181, + 185, + 185, + 189, + 193, + 193, + 198, + 198, + 202, + 205, + 205, + 209, + 209, + 213, + 217, + 217, + 221, + 221, + 226, + 229, + 229, + 233, + 233, + 237, + 241, + 241, + 245, + 245, + 249, + 255, + 255, + 255, + 0, + 0, + 0, + 57, + 76, + 65, + 77, + 69, + 51, + 46, + 57, + 57, + 114, + 2, + 105, + 0, + 0, + 0, + 0, + 46, + 46, + 0, + 0, + 20, + 40, + 36, + 4, + 31, + 66, + 0, + 0, + 40, + 0, + 0, + 32, + 235, + 56, + 85, + 255, + 236, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 255, + 243, + 80, + 196, + 0, + 24, + 155, + 30, + 164, + 1, + 67, + 40, + 0, + 46, + 187, + 185, + 253, + 119, + 115, + 230, + 224, + 2, + 19, + 244, + 220, + 56, + 28, + 35, + 116, + 33, + 206, + 115, + 191, + 232, + 66, + 103, + 57, + 9, + 83, + 156, + 249, + 222, + 132, + 33, + 50, + 16, + 132, + 20, + 33, + 27, + 144, + 132, + 33, + 27, + 161, + 8, + 79, + 212, + 231, + 58, + 16, + 62, + 1, + 128, + 97, + 240, + 248, + 187, + 161, + 3, + 225, + 243, + 191, + 252, + 231, + 59, + 255, + 242, + 16, + 132, + 243, + 188, + 132, + 33, + 42, + 66, + 16, + 132, + 33, + 9, + 245, + 57, + 222, + 115, + 156, + 231, + 57, + 206, + 255, + 206, + 113, + 64, + 65, + 192, + 248, + 62, + 8, + 2, + 25, + 127, + 242, + 138, + 4, + 1, + 33, + 0, + 16, + 64, + 9, + 1, + 102, + 142, + 34, + 32, + 70, + 51, + 42, + 18, + 127, + 70, + 255, + 243, + 160, + 196, + 18, + 70, + 92, + 22, + 176, + 213, + 153, + 192, + 0, + 127, + 166, + 2, + 176, + 37, + 0, + 161, + 160, + 101, + 203, + 0, + 10, + 138, + 2, + 124, + 238, + 44, + 42, + 16, + 20, + 37, + 238, + 68, + 82, + 235, + 151, + 29, + 18, + 145, + 192, + 2, + 6, + 158, + 135, + 128, + 176, + 130, + 208, + 206, + 24, + 33, + 168, + 169, + 80, + 166, + 99, + 245, + 148, + 178, + 196, + 84, + 119, + 40, + 225, + 227, + 10, + 150, + 243, + 178, + 221, + 209, + 33, + 249, + 197, + 204, + 70, + 122, + 6, + 51, + 37, + 106, + 98, + 17, + 37, + 91, + 235, + 102, + 24, + 83, + 120, + 252, + 62, + 243, + 202, + 226, + 214, + 227, + 49, + 205, + 66, + 94, + 102, + 101, + 23, + 142, + 180, + 153, + 36, + 223, + 37, + 245, + 109, + 103, + 45, + 173, + 186, + 149, + 97, + 170, + 29, + 214, + 138, + 54, + 40, + 118, + 25, + 127, + 169, + 229, + 146, + 154, + 104, + 205, + 52, + 178, + 49, + 79, + 95, + 146, + 106, + 178, + 27, + 178, + 150, + 125, + 22, + 185, + 39, + 198, + 204, + 204, + 171, + 26, + 251, + 149, + 71, + 101, + 216, + 88, + 141, + 75, + 167, + 249, + 132, + 162, + 154, + 247, + 55, + 77, + 30, + 185, + 87, + 234, + 202, + 173, + 208, + 87, + 144, + 74, + 39, + 229, + 18, + 167, + 238, + 43, + 106, + 228, + 166, + 93, + 45, + 131, + 49, + 189, + 107, + 147, + 52, + 87, + 111, + 86, + 251, + 152, + 212, + 213, + 220, + 45, + 103, + 99, + 47, + 185, + 106, + 190, + 24, + 214, + 166, + 164, + 179, + 190, + 234, + 173, + 185, + 158, + 218, + 153, + 126, + 109, + 231, + 87, + 233, + 168, + 49, + 194, + 174, + 117, + 113, + 203, + 238, + 103, + 77, + 102, + 245, + 205, + 225, + 173 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 1, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-02/input.png b/tests/end-to-end/structured-append-02/input.png new file mode 100644 index 00000000..d0a98c55 Binary files /dev/null and b/tests/end-to-end/structured-append-02/input.png differ diff --git a/tests/end-to-end/structured-append-02/output.json b/tests/end-to-end/structured-append-02/output.json new file mode 100644 index 00000000..f4043f16 --- /dev/null +++ b/tests/end-to-end/structured-append-02/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 81, + 99, + 106, + 158, + 237, + 78, + 223, + 239, + 46, + 222, + 187, + 246, + 245, + 44, + 199, + 26, + 12, + 172, + 89, + 149, + 103, + 150, + 187, + 94, + 151, + 249, + 98, + 158, + 173, + 91, + 213, + 10, + 238, + 39, + 96, + 146, + 82, + 11, + 8, + 140, + 28, + 234, + 243, + 81, + 52, + 159, + 100, + 104, + 31, + 230, + 202, + 177, + 30, + 153, + 97, + 126, + 255, + 175, + 34, + 9, + 81, + 184, + 96, + 3, + 225, + 10, + 231, + 255, + 243, + 64, + 196, + 36, + 31, + 138, + 122, + 196, + 11, + 207, + 64, + 0, + 136, + 2, + 178, + 160, + 168, + 64, + 22, + 9, + 4, + 194, + 227, + 22, + 222, + 7, + 149, + 34, + 50, + 85, + 77, + 167, + 60, + 30, + 214, + 57, + 34, + 235, + 116, + 138, + 121, + 235, + 78, + 183, + 227, + 186, + 154, + 185, + 154, + 184, + 153, + 236, + 215, + 187, + 187, + 177, + 251, + 213, + 68, + 112, + 253, + 255, + 197, + 255, + 247, + 87, + 235, + 247, + 243, + 67, + 83, + 218, + 146, + 186, + 159, + 30, + 52, + 36, + 28, + 64, + 228, + 104, + 128, + 242, + 163, + 226, + 59, + 72, + 178, + 40, + 176, + 171, + 145, + 90, + 242, + 138, + 185, + 91, + 240, + 10, + 81, + 246, + 170, + 255, + 243, + 96, + 196, + 0, + 31, + 171, + 214, + 192, + 12, + 194, + 68, + 153, + 194, + 13, + 88, + 112, + 164, + 196, + 86, + 42, + 140, + 57, + 169, + 190, + 109, + 54, + 138, + 212, + 24, + 166, + 84, + 57, + 158, + 70, + 193, + 194, + 104, + 198, + 198, + 1, + 39, + 10, + 64, + 209, + 50, + 217, + 25, + 52, + 223, + 44, + 252, + 131, + 238, + 13, + 98, + 177, + 66, + 101, + 104, + 203, + 85, + 69, + 121, + 204, + 26, + 96, + 174, + 37, + 217, + 214, + 136, + 204, + 66, + 207, + 76, + 234, + 201, + 89, + 24, + 234, + 237, + 157, + 212, + 179, + 42, + 206, + 82, + 208, + 168, + 246, + 217, + 200, + 135, + 100, + 51, + 211, + 70, + 118, + 215, + 107, + 65, + 157, + 22, + 221, + 110, + 157, + 251, + 179, + 210, + 169, + 211, + 66, + 77, + 253, + 93, + 117, + 171, + 229, + 74, + 43, + 34, + 94, + 143, + 106, + 43, + 207, + 95, + 99, + 250, + 213, + 54, + 169, + 163, + 52, + 106, + 61, + 186, + 218, + 221, + 2, + 0, + 224, + 106, + 177, + 200, + 47, + 0, + 120, + 112, + 84, + 13, + 244, + 213, + 91, + 121, + 255, + 243, + 80, + 196, + 16, + 29, + 41, + 154, + 189, + 106, + 123, + 6, + 80, + 97, + 4, + 172, + 13, + 206, + 10, + 163, + 42, + 49, + 74, + 44, + 88, + 82, + 90, + 116, + 0, + 33, + 16, + 148, + 144, + 91, + 168, + 80, + 98, + 108, + 110, + 144, + 92, + 129, + 4, + 8, + 10, + 228, + 219, + 26, + 232, + 22, + 155, + 82, + 141, + 157, + 251, + 177, + 122, + 253, + 208, + 33, + 155, + 31, + 150, + 241, + 1, + 5, + 146, + 19, + 121, + 112, + 227, + 38, + 82, + 211, + 166, + 133, + 212, + 124, + 164, + 210, + 84, + 31, + 181, + 75, + 131, + 66, + 210, + 104, + 109, + 122, + 214, + 52, + 130, + 144, + 2, + 22, + 100, + 141, + 64, + 82, + 2, + 231, + 87, + 45, + 91, + 182, + 104, + 178, + 90, + 12, + 161, + 83, + 108, + 74, + 3, + 18, + 25, + 178, + 72, + 154, + 78, + 88, + 170, + 67, + 78, + 166, + 85, + 74, + 24, + 133, + 255, + 243, + 80, + 196, + 16, + 30, + 66, + 74, + 205, + 190, + 121, + 134, + 148, + 194, + 119, + 21, + 173, + 73, + 147, + 136, + 28, + 20, + 145, + 106, + 254, + 164, + 21, + 11, + 6, + 61, + 21, + 60, + 49, + 169, + 67, + 17, + 160, + 180, + 61, + 30, + 85, + 168, + 48, + 181, + 17, + 5, + 20, + 190, + 2, + 134, + 161, + 171, + 28, + 225, + 220, + 149, + 179, + 114, + 169, + 214, + 130, + 171, + 59, + 16, + 38, + 169, + 21, + 152, + 195, + 76, + 219, + 215, + 92, + 47, + 228, + 100, + 159, + 73, + 233, + 195, + 63, + 207, + 36, + 55, + 188, + 62, + 143, + 114, + 93, + 34, + 87, + 76, + 80, + 10, + 125, + 242, + 205, + 138, + 224, + 34, + 52, + 234, + 46, + 5, + 73, + 241, + 70, + 197, + 217, + 205, + 57, + 143, + 90, + 114, + 20, + 7, + 83, + 153, + 133, + 102, + 73, + 55, + 133, + 49, + 95, + 21, + 90 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 2, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 81, + 99, + 106, + 158, + 237, + 78, + 223, + 239, + 46, + 222, + 187, + 246, + 245, + 44, + 199, + 26, + 12, + 172, + 89, + 149, + 103, + 150, + 187, + 94, + 151, + 249, + 98, + 158, + 173, + 91, + 213, + 10, + 238, + 39, + 96, + 146, + 82, + 11, + 8, + 140, + 28, + 234, + 243, + 81, + 52, + 159, + 100, + 104, + 31, + 230, + 202, + 177, + 30, + 153, + 97, + 126, + 255, + 175, + 34, + 9, + 81, + 184, + 96, + 3, + 225, + 10, + 231, + 255, + 243, + 64, + 196, + 36, + 31, + 138, + 122, + 196, + 11, + 207, + 64, + 0, + 136, + 2, + 178, + 160, + 168, + 64, + 22, + 9, + 4, + 194, + 227, + 22, + 222, + 7, + 149, + 34, + 50, + 85, + 77, + 167, + 60, + 30, + 214, + 57, + 34, + 235, + 116, + 138, + 121, + 235, + 78, + 183, + 227, + 186, + 154, + 185, + 154, + 184, + 153, + 236, + 215, + 187, + 187, + 177, + 251, + 213, + 68, + 112, + 253, + 255, + 197, + 255, + 247, + 87, + 235, + 247, + 243, + 67, + 83, + 218, + 146, + 186, + 159, + 30, + 52, + 36, + 28, + 64, + 228, + 104, + 128, + 242, + 163, + 226, + 59, + 72, + 178, + 40, + 176, + 171, + 145, + 90, + 242, + 138, + 185, + 91, + 240, + 10, + 81, + 246, + 170, + 255, + 243, + 96, + 196, + 0, + 31, + 171, + 214, + 192, + 12, + 194, + 68, + 153, + 194, + 13, + 88, + 112, + 164, + 196, + 86, + 42, + 140, + 57, + 169, + 190, + 109, + 54, + 138, + 212, + 24, + 166, + 84, + 57, + 158, + 70, + 193, + 194, + 104, + 198, + 198, + 1, + 39, + 10, + 64, + 209, + 50, + 217, + 25, + 52, + 223, + 44, + 252, + 131, + 238, + 13, + 98, + 177, + 66, + 101, + 104, + 203, + 85, + 69, + 121, + 204, + 26, + 96, + 174, + 37, + 217, + 214, + 136, + 204, + 66, + 207, + 76, + 234, + 201, + 89, + 24, + 234, + 237, + 157, + 212, + 179, + 42, + 206, + 82, + 208, + 168, + 246, + 217, + 200, + 135, + 100, + 51, + 211, + 70, + 118, + 215, + 107, + 65, + 157, + 22, + 221, + 110, + 157, + 251, + 179, + 210, + 169, + 211, + 66, + 77, + 253, + 93, + 117, + 171, + 229, + 74, + 43, + 34, + 94, + 143, + 106, + 43, + 207, + 95, + 99, + 250, + 213, + 54, + 169, + 163, + 52, + 106, + 61, + 186, + 218, + 221, + 2, + 0, + 224, + 106, + 177, + 200, + 47, + 0, + 120, + 112, + 84, + 13, + 244, + 213, + 91, + 121, + 255, + 243, + 80, + 196, + 16, + 29, + 41, + 154, + 189, + 106, + 123, + 6, + 80, + 97, + 4, + 172, + 13, + 206, + 10, + 163, + 42, + 49, + 74, + 44, + 88, + 82, + 90, + 116, + 0, + 33, + 16, + 148, + 144, + 91, + 168, + 80, + 98, + 108, + 110, + 144, + 92, + 129, + 4, + 8, + 10, + 228, + 219, + 26, + 232, + 22, + 155, + 82, + 141, + 157, + 251, + 177, + 122, + 253, + 208, + 33, + 155, + 31, + 150, + 241, + 1, + 5, + 146, + 19, + 121, + 112, + 227, + 38, + 82, + 211, + 166, + 133, + 212, + 124, + 164, + 210, + 84, + 31, + 181, + 75, + 131, + 66, + 210, + 104, + 109, + 122, + 214, + 52, + 130, + 144, + 2, + 22, + 100, + 141, + 64, + 82, + 2, + 231, + 87, + 45, + 91, + 182, + 104, + 178, + 90, + 12, + 161, + 83, + 108, + 74, + 3, + 18, + 25, + 178, + 72, + 154, + 78, + 88, + 170, + 67, + 78, + 166, + 85, + 74, + 24, + 133, + 255, + 243, + 80, + 196, + 16, + 30, + 66, + 74, + 205, + 190, + 121, + 134, + 148, + 194, + 119, + 21, + 173, + 73, + 147, + 136, + 28, + 20, + 145, + 106, + 254, + 164, + 21, + 11, + 6, + 61, + 21, + 60, + 49, + 169, + 67, + 17, + 160, + 180, + 61, + 30, + 85, + 168, + 48, + 181, + 17, + 5, + 20, + 190, + 2, + 134, + 161, + 171, + 28, + 225, + 220, + 149, + 179, + 114, + 169, + 214, + 130, + 171, + 59, + 16, + 38, + 169, + 21, + 152, + 195, + 76, + 219, + 215, + 92, + 47, + 228, + 100, + 159, + 73, + 233, + 195, + 63, + 207, + 36, + 55, + 188, + 62, + 143, + 114, + 93, + 34, + 87, + 76, + 80, + 10, + 125, + 242, + 205, + 138, + 224, + 34, + 52, + 234, + 46, + 5, + 73, + 241, + 70, + 197, + 217, + 205, + 57, + 143, + 90, + 114, + 20, + 7, + 83, + 153, + 133, + 102, + 73, + 55, + 133, + 49, + 95, + 21, + 90 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 2, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-03/input.png b/tests/end-to-end/structured-append-03/input.png new file mode 100644 index 00000000..31a4a592 Binary files /dev/null and b/tests/end-to-end/structured-append-03/input.png differ diff --git a/tests/end-to-end/structured-append-03/output.json b/tests/end-to-end/structured-append-03/output.json new file mode 100644 index 00000000..e0461054 --- /dev/null +++ b/tests/end-to-end/structured-append-03/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 108, + 45, + 42, + 255, + 243, + 80, + 196, + 12, + 26, + 217, + 202, + 184, + 82, + 121, + 134, + 188, + 139, + 207, + 99, + 138, + 133, + 198, + 123, + 102, + 89, + 65, + 84, + 236, + 210, + 233, + 154, + 49, + 188, + 197, + 150, + 151, + 133, + 148, + 254, + 179, + 253, + 213, + 182, + 244, + 9, + 169, + 223, + 89, + 245, + 243, + 105, + 22, + 125, + 188, + 97, + 114, + 218, + 135, + 188, + 41, + 79, + 255, + 241, + 85, + 212, + 39, + 238, + 26, + 181, + 213, + 39, + 118, + 224, + 192, + 6, + 88, + 70, + 117, + 115, + 7, + 225, + 113, + 160, + 35, + 207, + 104, + 184, + 125, + 72, + 88, + 179, + 203, + 32, + 82, + 172, + 173, + 52, + 143, + 102, + 178, + 216, + 88, + 234, + 34, + 228, + 16, + 19, + 202, + 99, + 108, + 241, + 213, + 5, + 182, + 237, + 219, + 54, + 154, + 82, + 188, + 176, + 245, + 161, + 39, + 20, + 46, + 62, + 141, + 78, + 8, + 81, + 240, + 166, + 255, + 243, + 64, + 196, + 21, + 27, + 217, + 2, + 217, + 190, + 73, + 134, + 124, + 8, + 187, + 237, + 44, + 157, + 39, + 155, + 114, + 217, + 230, + 19, + 164, + 140, + 149, + 94, + 238, + 218, + 109, + 152, + 145, + 230, + 53, + 105, + 21, + 170, + 44, + 168, + 80, + 16, + 152, + 159, + 32, + 36, + 26, + 15, + 226, + 132, + 37, + 28, + 183, + 36, + 160, + 88, + 34, + 15, + 168, + 34, + 147, + 111, + 98, + 129, + 1, + 166, + 210, + 81, + 17, + 56, + 126, + 39, + 168, + 108, + 49, + 72, + 124, + 229, + 31, + 205, + 136, + 208, + 224, + 253, + 228, + 4, + 239, + 112, + 62, + 64, + 105, + 241, + 112, + 253, + 93, + 236, + 123, + 7, + 6, + 10, + 137, + 254, + 179, + 106, + 255, + 243, + 96, + 196, + 0, + 29, + 114, + 254, + 200, + 0, + 192, + 70, + 240, + 171, + 108, + 26, + 20, + 50, + 34, + 97, + 102, + 17, + 60, + 191, + 41, + 132, + 192, + 158, + 184, + 243, + 151, + 106, + 236, + 162, + 69, + 41, + 153, + 148, + 203, + 185, + 127, + 120, + 103, + 148, + 206, + 226, + 221, + 58, + 48, + 58, + 136, + 93, + 74, + 79, + 249, + 20, + 255, + 164, + 176, + 81, + 168, + 9, + 170, + 161, + 249, + 59, + 244, + 175, + 149, + 51, + 232, + 50, + 216, + 192, + 133, + 56, + 81, + 38, + 198, + 173, + 9, + 75, + 105, + 35, + 29, + 85, + 216, + 23, + 15, + 200, + 138, + 8, + 54, + 198, + 195, + 3, + 40, + 14, + 31, + 105, + 74, + 140, + 199, + 111, + 75, + 187, + 109, + 126, + 254, + 190, + 42, + 6, + 10, + 134, + 131, + 160, + 226, + 64, + 42, + 152, + 10, + 30, + 81, + 166, + 177, + 104, + 181, + 197, + 168, + 237, + 174, + 0, + 185, + 25, + 101, + 223, + 255, + 27, + 77, + 238, + 119, + 156, + 194, + 98, + 192, + 70, + 154, + 79, + 231, + 192, + 16, + 18, + 75, + 50, + 173, + 6, + 255, + 243, + 64, + 196, + 25, + 27, + 113, + 138, + 230, + 126, + 121, + 134, + 88, + 65, + 51, + 235, + 185, + 26, + 216, + 212, + 203, + 60, + 108, + 239, + 197, + 21, + 44, + 149, + 69, + 48, + 76, + 223, + 139, + 9, + 66, + 17, + 186, + 172, + 35, + 4, + 133, + 161, + 209, + 202, + 24, + 202, + 239, + 76, + 18, + 255, + 114, + 41, + 127, + 131, + 85, + 89, + 23, + 11, + 24, + 98, + 92, + 36, + 29, + 208, + 107, + 38, + 16, + 162, + 194, + 40, + 81, + 1, + 200, + 86, + 44, + 159, + 47, + 16, + 165, + 165, + 216, + 212, + 158, + 179, + 78, + 171, + 58, + 209, + 22, + 82, + 154, + 243, + 96, + 245, + 103, + 216, + 197, + 50, + 0, + 37, + 29, + 251, + 120, + 210, + 255, + 243, + 80, + 196, + 6, + 27, + 82, + 210, + 218, + 94, + 121, + 132, + 124, + 69, + 41, + 98, + 2, + 140, + 31, + 199, + 137, + 80, + 107, + 46, + 98, + 70, + 157, + 128, + 8, + 214, + 72, + 255, + 103, + 47, + 225, + 83, + 142, + 181, + 36, + 205, + 149, + 156, + 169, + 117, + 45, + 171, + 25, + 138, + 99, + 165, + 29, + 173, + 169, + 101, + 236, + 143, + 161, + 74, + 134, + 135, + 109, + 169, + 190, + 254, + 174, + 240, + 77, + 163, + 243, + 185, + 77, + 12, + 206, + 128, + 198, + 238, + 158, + 217, + 25, + 108, + 151, + 68, + 74, + 21, + 159, + 176, + 55 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 3, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 108, + 45, + 42, + 255, + 243, + 80, + 196, + 12, + 26, + 217, + 202, + 184, + 82, + 121, + 134, + 188, + 139, + 207, + 99, + 138, + 133, + 198, + 123, + 102, + 89, + 65, + 84, + 236, + 210, + 233, + 154, + 49, + 188, + 197, + 150, + 151, + 133, + 148, + 254, + 179, + 253, + 213, + 182, + 244, + 9, + 169, + 223, + 89, + 245, + 243, + 105, + 22, + 125, + 188, + 97, + 114, + 218, + 135, + 188, + 41, + 79, + 255, + 241, + 85, + 212, + 39, + 238, + 26, + 181, + 213, + 39, + 118, + 224, + 192, + 6, + 88, + 70, + 117, + 115, + 7, + 225, + 113, + 160, + 35, + 207, + 104, + 184, + 125, + 72, + 88, + 179, + 203, + 32, + 82, + 172, + 173, + 52, + 143, + 102, + 178, + 216, + 88, + 234, + 34, + 228, + 16, + 19, + 202, + 99, + 108, + 241, + 213, + 5, + 182, + 237, + 219, + 54, + 154, + 82, + 188, + 176, + 245, + 161, + 39, + 20, + 46, + 62, + 141, + 78, + 8, + 81, + 240, + 166, + 255, + 243, + 64, + 196, + 21, + 27, + 217, + 2, + 217, + 190, + 73, + 134, + 124, + 8, + 187, + 237, + 44, + 157, + 39, + 155, + 114, + 217, + 230, + 19, + 164, + 140, + 149, + 94, + 238, + 218, + 109, + 152, + 145, + 230, + 53, + 105, + 21, + 170, + 44, + 168, + 80, + 16, + 152, + 159, + 32, + 36, + 26, + 15, + 226, + 132, + 37, + 28, + 183, + 36, + 160, + 88, + 34, + 15, + 168, + 34, + 147, + 111, + 98, + 129, + 1, + 166, + 210, + 81, + 17, + 56, + 126, + 39, + 168, + 108, + 49, + 72, + 124, + 229, + 31, + 205, + 136, + 208, + 224, + 253, + 228, + 4, + 239, + 112, + 62, + 64, + 105, + 241, + 112, + 253, + 93, + 236, + 123, + 7, + 6, + 10, + 137, + 254, + 179, + 106, + 255, + 243, + 96, + 196, + 0, + 29, + 114, + 254, + 200, + 0, + 192, + 70, + 240, + 171, + 108, + 26, + 20, + 50, + 34, + 97, + 102, + 17, + 60, + 191, + 41, + 132, + 192, + 158, + 184, + 243, + 151, + 106, + 236, + 162, + 69, + 41, + 153, + 148, + 203, + 185, + 127, + 120, + 103, + 148, + 206, + 226, + 221, + 58, + 48, + 58, + 136, + 93, + 74, + 79, + 249, + 20, + 255, + 164, + 176, + 81, + 168, + 9, + 170, + 161, + 249, + 59, + 244, + 175, + 149, + 51, + 232, + 50, + 216, + 192, + 133, + 56, + 81, + 38, + 198, + 173, + 9, + 75, + 105, + 35, + 29, + 85, + 216, + 23, + 15, + 200, + 138, + 8, + 54, + 198, + 195, + 3, + 40, + 14, + 31, + 105, + 74, + 140, + 199, + 111, + 75, + 187, + 109, + 126, + 254, + 190, + 42, + 6, + 10, + 134, + 131, + 160, + 226, + 64, + 42, + 152, + 10, + 30, + 81, + 166, + 177, + 104, + 181, + 197, + 168, + 237, + 174, + 0, + 185, + 25, + 101, + 223, + 255, + 27, + 77, + 238, + 119, + 156, + 194, + 98, + 192, + 70, + 154, + 79, + 231, + 192, + 16, + 18, + 75, + 50, + 173, + 6, + 255, + 243, + 64, + 196, + 25, + 27, + 113, + 138, + 230, + 126, + 121, + 134, + 88, + 65, + 51, + 235, + 185, + 26, + 216, + 212, + 203, + 60, + 108, + 239, + 197, + 21, + 44, + 149, + 69, + 48, + 76, + 223, + 139, + 9, + 66, + 17, + 186, + 172, + 35, + 4, + 133, + 161, + 209, + 202, + 24, + 202, + 239, + 76, + 18, + 255, + 114, + 41, + 127, + 131, + 85, + 89, + 23, + 11, + 24, + 98, + 92, + 36, + 29, + 208, + 107, + 38, + 16, + 162, + 194, + 40, + 81, + 1, + 200, + 86, + 44, + 159, + 47, + 16, + 165, + 165, + 216, + 212, + 158, + 179, + 78, + 171, + 58, + 209, + 22, + 82, + 154, + 243, + 96, + 245, + 103, + 216, + 197, + 50, + 0, + 37, + 29, + 251, + 120, + 210, + 255, + 243, + 80, + 196, + 6, + 27, + 82, + 210, + 218, + 94, + 121, + 132, + 124, + 69, + 41, + 98, + 2, + 140, + 31, + 199, + 137, + 80, + 107, + 46, + 98, + 70, + 157, + 128, + 8, + 214, + 72, + 255, + 103, + 47, + 225, + 83, + 142, + 181, + 36, + 205, + 149, + 156, + 169, + 117, + 45, + 171, + 25, + 138, + 99, + 165, + 29, + 173, + 169, + 101, + 236, + 143, + 161, + 74, + 134, + 135, + 109, + 169, + 190, + 254, + 174, + 240, + 77, + 163, + 243, + 185, + 77, + 12, + 206, + 128, + 198, + 238, + 158, + 217, + 25, + 108, + 151, + 68, + 74, + 21, + 159, + 176, + 55 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 3, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-04/input.png b/tests/end-to-end/structured-append-04/input.png new file mode 100644 index 00000000..195cee0f Binary files /dev/null and b/tests/end-to-end/structured-append-04/input.png differ diff --git a/tests/end-to-end/structured-append-04/output.json b/tests/end-to-end/structured-append-04/output.json new file mode 100644 index 00000000..f78bc489 --- /dev/null +++ b/tests/end-to-end/structured-append-04/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 218, + 163, + 239, + 71, + 252, + 254, + 200, + 123, + 38, + 144, + 197, + 212, + 43, + 97, + 27, + 15, + 202, + 225, + 86, + 255, + 175, + 140, + 83, + 143, + 5, + 15, + 197, + 207, + 123, + 170, + 0, + 61, + 55, + 255, + 251, + 89, + 72, + 201, + 167, + 100, + 161, + 56, + 88, + 255, + 243, + 80, + 196, + 13, + 27, + 219, + 214, + 218, + 94, + 72, + 202, + 216, + 177, + 53, + 153, + 32, + 88, + 251, + 230, + 229, + 49, + 82, + 200, + 86, + 220, + 4, + 51, + 208, + 93, + 67, + 54, + 52, + 10, + 2, + 29, + 169, + 170, + 200, + 51, + 201, + 202, + 12, + 168, + 171, + 110, + 83, + 138, + 196, + 20, + 24, + 146, + 103, + 19, + 250, + 106, + 93, + 91, + 100, + 139, + 230, + 118, + 170, + 209, + 40, + 94, + 53, + 171, + 170, + 177, + 15, + 238, + 213, + 219, + 126, + 155, + 78, + 30, + 219, + 14, + 186, + 167, + 50, + 83, + 167, + 255, + 163, + 209, + 62, + 155, + 223, + 93, + 115, + 22, + 42, + 46, + 105, + 19, + 115, + 116, + 53, + 231, + 235, + 145, + 210, + 44, + 84, + 254, + 12, + 254, + 157, + 53, + 0, + 41, + 34, + 29, + 223, + 89, + 19, + 74, + 89, + 21, + 6, + 116, + 144, + 93, + 10, + 187, + 244, + 137, + 255, + 243, + 64, + 196, + 18, + 26, + 250, + 94, + 218, + 126, + 73, + 138, + 92, + 99, + 50, + 238, + 16, + 34, + 65, + 137, + 26, + 145, + 233, + 229, + 229, + 231, + 251, + 162, + 146, + 157, + 130, + 241, + 227, + 230, + 21, + 113, + 172, + 32, + 177, + 74, + 177, + 123, + 152, + 205, + 133, + 106, + 116, + 47, + 244, + 61, + 196, + 102, + 83, + 212, + 107, + 38, + 58, + 239, + 116, + 216, + 89, + 109, + 157, + 217, + 26, + 99, + 157, + 42, + 221, + 74, + 140, + 202, + 218, + 169, + 155, + 160, + 198, + 159, + 124, + 124, + 109, + 43, + 241, + 230, + 73, + 93, + 55, + 85, + 7, + 146, + 65, + 231, + 142, + 187, + 90, + 182, + 166, + 24, + 110, + 128, + 205, + 223, + 40, + 4, + 255, + 243, + 80, + 196, + 1, + 26, + 123, + 206, + 206, + 126, + 96, + 196, + 236, + 24, + 218, + 21, + 150, + 166, + 2, + 69, + 198, + 202, + 76, + 173, + 42, + 194, + 99, + 183, + 190, + 176, + 253, + 239, + 244, + 198, + 146, + 230, + 44, + 20, + 60, + 212, + 100, + 84, + 136, + 154, + 152, + 145, + 80, + 202, + 182, + 81, + 48, + 67, + 38, + 78, + 30, + 227, + 126, + 178, + 173, + 12, + 41, + 17, + 135, + 143, + 39, + 79, + 119, + 177, + 184, + 62, + 143, + 77, + 248, + 35, + 55, + 68, + 90, + 221, + 65, + 181, + 147, + 232, + 150, + 46, + 136, + 140, + 215, + 168, + 97, + 145, + 58, + 122, + 160, + 167, + 174, + 255, + 213, + 171, + 86, + 245, + 78, + 202, + 210, + 34, + 174, + 103, + 75, + 161, + 254, + 203, + 238, + 250, + 235, + 145, + 211, + 248, + 119, + 211, + 6, + 247, + 236, + 154, + 2, + 52, + 124, + 39, + 22, + 150, + 180, + 10, + 255, + 243, + 80, + 196, + 12, + 27, + 51, + 22, + 193, + 180, + 98, + 68, + 56, + 29, + 16, + 106, + 200, + 17, + 157, + 149, + 73, + 211, + 89, + 89, + 224, + 124, + 87, + 2, + 88, + 170, + 158, + 83, + 30, + 202, + 40, + 91, + 146, + 81, + 40, + 54, + 207, + 162, + 41, + 39, + 127, + 125, + 170, + 231, + 80, + 29, + 5, + 119, + 246, + 238, + 71, + 33, + 116, + 181, + 142, + 105, + 157, + 27, + 83, + 21, + 45, + 65, + 136, + 231, + 236, + 246, + 53, + 26, + 161, + 206, + 242, + 91, + 50, + 151, + 172, + 69, + 221, + 181, + 250, + 114, + 202, + 84, + 111, + 105, + 236, + 183, + 103, + 118, + 114, + 181, + 72, + 36, + 100, + 48, + 42, + 58, + 135, + 234, + 154, + 196, + 84, + 136, + 115, + 226, + 0, + 105, + 0, + 205, + 246, + 255, + 248, + 209, + 73, + 57, + 187, + 146, + 137, + 206, + 106, + 179, + 177, + 74, + 226, + 173, + 117, + 216, + 255, + 243, + 112, + 196, + 20, + 43, + 171, + 146, + 226, + 94, + 194, + 71, + 101, + 35, + 42, + 121, + 40, + 250, + 115, + 43, + 214, + 28, + 10, + 27, + 175, + 27, + 160, + 170, + 225, + 191, + 114, + 138, + 244, + 171, + 204, + 179, + 107, + 153, + 31, + 37, + 174, + 154, + 97, + 192, + 17, + 201, + 75 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 4, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 218, + 163, + 239, + 71, + 252, + 254, + 200, + 123, + 38, + 144, + 197, + 212, + 43, + 97, + 27, + 15, + 202, + 225, + 86, + 255, + 175, + 140, + 83, + 143, + 5, + 15, + 197, + 207, + 123, + 170, + 0, + 61, + 55, + 255, + 251, + 89, + 72, + 201, + 167, + 100, + 161, + 56, + 88, + 255, + 243, + 80, + 196, + 13, + 27, + 219, + 214, + 218, + 94, + 72, + 202, + 216, + 177, + 53, + 153, + 32, + 88, + 251, + 230, + 229, + 49, + 82, + 200, + 86, + 220, + 4, + 51, + 208, + 93, + 67, + 54, + 52, + 10, + 2, + 29, + 169, + 170, + 200, + 51, + 201, + 202, + 12, + 168, + 171, + 110, + 83, + 138, + 196, + 20, + 24, + 146, + 103, + 19, + 250, + 106, + 93, + 91, + 100, + 139, + 230, + 118, + 170, + 209, + 40, + 94, + 53, + 171, + 170, + 177, + 15, + 238, + 213, + 219, + 126, + 155, + 78, + 30, + 219, + 14, + 186, + 167, + 50, + 83, + 167, + 255, + 163, + 209, + 62, + 155, + 223, + 93, + 115, + 22, + 42, + 46, + 105, + 19, + 115, + 116, + 53, + 231, + 235, + 145, + 210, + 44, + 84, + 254, + 12, + 254, + 157, + 53, + 0, + 41, + 34, + 29, + 223, + 89, + 19, + 74, + 89, + 21, + 6, + 116, + 144, + 93, + 10, + 187, + 244, + 137, + 255, + 243, + 64, + 196, + 18, + 26, + 250, + 94, + 218, + 126, + 73, + 138, + 92, + 99, + 50, + 238, + 16, + 34, + 65, + 137, + 26, + 145, + 233, + 229, + 229, + 231, + 251, + 162, + 146, + 157, + 130, + 241, + 227, + 230, + 21, + 113, + 172, + 32, + 177, + 74, + 177, + 123, + 152, + 205, + 133, + 106, + 116, + 47, + 244, + 61, + 196, + 102, + 83, + 212, + 107, + 38, + 58, + 239, + 116, + 216, + 89, + 109, + 157, + 217, + 26, + 99, + 157, + 42, + 221, + 74, + 140, + 202, + 218, + 169, + 155, + 160, + 198, + 159, + 124, + 124, + 109, + 43, + 241, + 230, + 73, + 93, + 55, + 85, + 7, + 146, + 65, + 231, + 142, + 187, + 90, + 182, + 166, + 24, + 110, + 128, + 205, + 223, + 40, + 4, + 255, + 243, + 80, + 196, + 1, + 26, + 123, + 206, + 206, + 126, + 96, + 196, + 236, + 24, + 218, + 21, + 150, + 166, + 2, + 69, + 198, + 202, + 76, + 173, + 42, + 194, + 99, + 183, + 190, + 176, + 253, + 239, + 244, + 198, + 146, + 230, + 44, + 20, + 60, + 212, + 100, + 84, + 136, + 154, + 152, + 145, + 80, + 202, + 182, + 81, + 48, + 67, + 38, + 78, + 30, + 227, + 126, + 178, + 173, + 12, + 41, + 17, + 135, + 143, + 39, + 79, + 119, + 177, + 184, + 62, + 143, + 77, + 248, + 35, + 55, + 68, + 90, + 221, + 65, + 181, + 147, + 232, + 150, + 46, + 136, + 140, + 215, + 168, + 97, + 145, + 58, + 122, + 160, + 167, + 174, + 255, + 213, + 171, + 86, + 245, + 78, + 202, + 210, + 34, + 174, + 103, + 75, + 161, + 254, + 203, + 238, + 250, + 235, + 145, + 211, + 248, + 119, + 211, + 6, + 247, + 236, + 154, + 2, + 52, + 124, + 39, + 22, + 150, + 180, + 10, + 255, + 243, + 80, + 196, + 12, + 27, + 51, + 22, + 193, + 180, + 98, + 68, + 56, + 29, + 16, + 106, + 200, + 17, + 157, + 149, + 73, + 211, + 89, + 89, + 224, + 124, + 87, + 2, + 88, + 170, + 158, + 83, + 30, + 202, + 40, + 91, + 146, + 81, + 40, + 54, + 207, + 162, + 41, + 39, + 127, + 125, + 170, + 231, + 80, + 29, + 5, + 119, + 246, + 238, + 71, + 33, + 116, + 181, + 142, + 105, + 157, + 27, + 83, + 21, + 45, + 65, + 136, + 231, + 236, + 246, + 53, + 26, + 161, + 206, + 242, + 91, + 50, + 151, + 172, + 69, + 221, + 181, + 250, + 114, + 202, + 84, + 111, + 105, + 236, + 183, + 103, + 118, + 114, + 181, + 72, + 36, + 100, + 48, + 42, + 58, + 135, + 234, + 154, + 196, + 84, + 136, + 115, + 226, + 0, + 105, + 0, + 205, + 246, + 255, + 248, + 209, + 73, + 57, + 187, + 146, + 137, + 206, + 106, + 179, + 177, + 74, + 226, + 173, + 117, + 216, + 255, + 243, + 112, + 196, + 20, + 43, + 171, + 146, + 226, + 94, + 194, + 71, + 101, + 35, + 42, + 121, + 40, + 250, + 115, + 43, + 214, + 28, + 10, + 27, + 175, + 27, + 160, + 170, + 225, + 191, + 114, + 138, + 244, + 171, + 204, + 179, + 107, + 153, + 31, + 37, + 174, + 154, + 97, + 192, + 17, + 201, + 75 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 4, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-05/input.png b/tests/end-to-end/structured-append-05/input.png new file mode 100644 index 00000000..15e7a58a Binary files /dev/null and b/tests/end-to-end/structured-append-05/input.png differ diff --git a/tests/end-to-end/structured-append-05/output.json b/tests/end-to-end/structured-append-05/output.json new file mode 100644 index 00000000..5cbee4ae --- /dev/null +++ b/tests/end-to-end/structured-append-05/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 151, + 90, + 220, + 57, + 19, + 158, + 116, + 215, + 68, + 204, + 16, + 252, + 188, + 240, + 196, + 161, + 97, + 20, + 236, + 48, + 20, + 49, + 7, + 97, + 133, + 197, + 109, + 206, + 100, + 4, + 144, + 158, + 149, + 0, + 230, + 133, + 99, + 6, + 73, + 200, + 229, + 158, + 167, + 155, + 231, + 152, + 137, + 77, + 69, + 132, + 46, + 26, + 37, + 235, + 105, + 3, + 245, + 209, + 69, + 132, + 23, + 129, + 205, + 63, + 52, + 0, + 14, + 214, + 17, + 216, + 65, + 252, + 246, + 46, + 16, + 113, + 127, + 240, + 143, + 8, + 73, + 160, + 49, + 127, + 211, + 66, + 149, + 233, + 254, + 155, + 197, + 22, + 243, + 174, + 249, + 249, + 125, + 62, + 23, + 210, + 50, + 136, + 153, + 251, + 157, + 130, + 10, + 82, + 14, + 235, + 216, + 30, + 252, + 230, + 109, + 201, + 33, + 252, + 123, + 231, + 218, + 48, + 24, + 205, + 97, + 146, + 32, + 2, + 23, + 242, + 71, + 27, + 69, + 13, + 142, + 255, + 243, + 96, + 196, + 14, + 35, + 131, + 206, + 226, + 124, + 102, + 10, + 180, + 141, + 171, + 86, + 14, + 7, + 136, + 46, + 124, + 73, + 68, + 171, + 246, + 50, + 140, + 59, + 188, + 173, + 168, + 29, + 55, + 68, + 181, + 36, + 92, + 170, + 220, + 163, + 144, + 214, + 229, + 177, + 53, + 83, + 100, + 150, + 110, + 103, + 168, + 42, + 172, + 170, + 207, + 26, + 236, + 86, + 154, + 255, + 185, + 82, + 123, + 51, + 66, + 194, + 34, + 198, + 89, + 193, + 223, + 17, + 42, + 168, + 171, + 167, + 170, + 91, + 165, + 78, + 53, + 103, + 215, + 65, + 46, + 241, + 232, + 101, + 113, + 21, + 75, + 45, + 74, + 203, + 173, + 5, + 212, + 174, + 147, + 93, + 81, + 206, + 90, + 58, + 110, + 61, + 105, + 61, + 150, + 251, + 199, + 122, + 255, + 244, + 255, + 87, + 247, + 180, + 105, + 251, + 6, + 149, + 209, + 78, + 221, + 93, + 11, + 59, + 106, + 168, + 221, + 46, + 186, + 214, + 36, + 66, + 39, + 164, + 210, + 74, + 145, + 152, + 150, + 106, + 104, + 112, + 249, + 25, + 71, + 26, + 182, + 2, + 175, + 142, + 147, + 110, + 255, + 243, + 80, + 196, + 15, + 27, + 226, + 234, + 218, + 74, + 123, + 4, + 60, + 172, + 125, + 51, + 22, + 101, + 208, + 12, + 89, + 80, + 182, + 203, + 190, + 43, + 93, + 17, + 191, + 205, + 163, + 119, + 37, + 106, + 213, + 61, + 66, + 230, + 82, + 136, + 103, + 51, + 16, + 192, + 165, + 14, + 137, + 40, + 149, + 45, + 158, + 149, + 66, + 229, + 43, + 219, + 205, + 154, + 244, + 74, + 45, + 119, + 103, + 125, + 233, + 103, + 114, + 167, + 37, + 180, + 51, + 178, + 148, + 205, + 55, + 173, + 87, + 125, + 58, + 34, + 63, + 162, + 63, + 133, + 162, + 41, + 25, + 245, + 246, + 18, + 228, + 13, + 205, + 173, + 169, + 143, + 138, + 162, + 78, + 47, + 105, + 77, + 245, + 150, + 30, + 76, + 204, + 42, + 238, + 218, + 32, + 6, + 119, + 128, + 104, + 103, + 20, + 163, + 137, + 23, + 37, + 164, + 78, + 139, + 121, + 118, + 209, + 45, + 231, + 89, + 255, + 243, + 80, + 196, + 20, + 28, + 250, + 114, + 197, + 144, + 72, + 135, + 128, + 92, + 140, + 19, + 24, + 106, + 210, + 220, + 106, + 230, + 83, + 199, + 106, + 242, + 179, + 28, + 132, + 66, + 133, + 56, + 174, + 10, + 227, + 77, + 109, + 228, + 254, + 108, + 107, + 9, + 158, + 3, + 100, + 133, + 19, + 79, + 242, + 195, + 40, + 185, + 15, + 15, + 42, + 65, + 122, + 183, + 43, + 11, + 135, + 137, + 132, + 88, + 147, + 213, + 44, + 226, + 198, + 171, + 60, + 171, + 246, + 47, + 212, + 234, + 223, + 1, + 37, + 31, + 96, + 116, + 36, + 185, + 34, + 77, + 124, + 139, + 192, + 207, + 120, + 231, + 199, + 146, + 23, + 54, + 146, + 226, + 78, + 110, + 186, + 16, + 179, + 4, + 78, + 177, + 235, + 37, + 211, + 84, + 165, + 50, + 150, + 218, + 168, + 83, + 203, + 208, + 89, + 67, + 61, + 112, + 107, + 85, + 101, + 142, + 161, + 87, + 232, + 88, + 255, + 243, + 64, + 196, + 21, + 26, + 225, + 134, + 202, + 84, + 97, + 135, + 36, + 187, + 188, + 235, + 181, + 99, + 254, + 173, + 23, + 191, + 24, + 128, + 10, + 35, + 101, + 9, + 252, + 182, + 55, + 79, + 4 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 5, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 151, + 90, + 220, + 57, + 19, + 158, + 116, + 215, + 68, + 204, + 16, + 252, + 188, + 240, + 196, + 161, + 97, + 20, + 236, + 48, + 20, + 49, + 7, + 97, + 133, + 197, + 109, + 206, + 100, + 4, + 144, + 158, + 149, + 0, + 230, + 133, + 99, + 6, + 73, + 200, + 229, + 158, + 167, + 155, + 231, + 152, + 137, + 77, + 69, + 132, + 46, + 26, + 37, + 235, + 105, + 3, + 245, + 209, + 69, + 132, + 23, + 129, + 205, + 63, + 52, + 0, + 14, + 214, + 17, + 216, + 65, + 252, + 246, + 46, + 16, + 113, + 127, + 240, + 143, + 8, + 73, + 160, + 49, + 127, + 211, + 66, + 149, + 233, + 254, + 155, + 197, + 22, + 243, + 174, + 249, + 249, + 125, + 62, + 23, + 210, + 50, + 136, + 153, + 251, + 157, + 130, + 10, + 82, + 14, + 235, + 216, + 30, + 252, + 230, + 109, + 201, + 33, + 252, + 123, + 231, + 218, + 48, + 24, + 205, + 97, + 146, + 32, + 2, + 23, + 242, + 71, + 27, + 69, + 13, + 142, + 255, + 243, + 96, + 196, + 14, + 35, + 131, + 206, + 226, + 124, + 102, + 10, + 180, + 141, + 171, + 86, + 14, + 7, + 136, + 46, + 124, + 73, + 68, + 171, + 246, + 50, + 140, + 59, + 188, + 173, + 168, + 29, + 55, + 68, + 181, + 36, + 92, + 170, + 220, + 163, + 144, + 214, + 229, + 177, + 53, + 83, + 100, + 150, + 110, + 103, + 168, + 42, + 172, + 170, + 207, + 26, + 236, + 86, + 154, + 255, + 185, + 82, + 123, + 51, + 66, + 194, + 34, + 198, + 89, + 193, + 223, + 17, + 42, + 168, + 171, + 167, + 170, + 91, + 165, + 78, + 53, + 103, + 215, + 65, + 46, + 241, + 232, + 101, + 113, + 21, + 75, + 45, + 74, + 203, + 173, + 5, + 212, + 174, + 147, + 93, + 81, + 206, + 90, + 58, + 110, + 61, + 105, + 61, + 150, + 251, + 199, + 122, + 255, + 244, + 255, + 87, + 247, + 180, + 105, + 251, + 6, + 149, + 209, + 78, + 221, + 93, + 11, + 59, + 106, + 168, + 221, + 46, + 186, + 214, + 36, + 66, + 39, + 164, + 210, + 74, + 145, + 152, + 150, + 106, + 104, + 112, + 249, + 25, + 71, + 26, + 182, + 2, + 175, + 142, + 147, + 110, + 255, + 243, + 80, + 196, + 15, + 27, + 226, + 234, + 218, + 74, + 123, + 4, + 60, + 172, + 125, + 51, + 22, + 101, + 208, + 12, + 89, + 80, + 182, + 203, + 190, + 43, + 93, + 17, + 191, + 205, + 163, + 119, + 37, + 106, + 213, + 61, + 66, + 230, + 82, + 136, + 103, + 51, + 16, + 192, + 165, + 14, + 137, + 40, + 149, + 45, + 158, + 149, + 66, + 229, + 43, + 219, + 205, + 154, + 244, + 74, + 45, + 119, + 103, + 125, + 233, + 103, + 114, + 167, + 37, + 180, + 51, + 178, + 148, + 205, + 55, + 173, + 87, + 125, + 58, + 34, + 63, + 162, + 63, + 133, + 162, + 41, + 25, + 245, + 246, + 18, + 228, + 13, + 205, + 173, + 169, + 143, + 138, + 162, + 78, + 47, + 105, + 77, + 245, + 150, + 30, + 76, + 204, + 42, + 238, + 218, + 32, + 6, + 119, + 128, + 104, + 103, + 20, + 163, + 137, + 23, + 37, + 164, + 78, + 139, + 121, + 118, + 209, + 45, + 231, + 89, + 255, + 243, + 80, + 196, + 20, + 28, + 250, + 114, + 197, + 144, + 72, + 135, + 128, + 92, + 140, + 19, + 24, + 106, + 210, + 220, + 106, + 230, + 83, + 199, + 106, + 242, + 179, + 28, + 132, + 66, + 133, + 56, + 174, + 10, + 227, + 77, + 109, + 228, + 254, + 108, + 107, + 9, + 158, + 3, + 100, + 133, + 19, + 79, + 242, + 195, + 40, + 185, + 15, + 15, + 42, + 65, + 122, + 183, + 43, + 11, + 135, + 137, + 132, + 88, + 147, + 213, + 44, + 226, + 198, + 171, + 60, + 171, + 246, + 47, + 212, + 234, + 223, + 1, + 37, + 31, + 96, + 116, + 36, + 185, + 34, + 77, + 124, + 139, + 192, + 207, + 120, + 231, + 199, + 146, + 23, + 54, + 146, + 226, + 78, + 110, + 186, + 16, + 179, + 4, + 78, + 177, + 235, + 37, + 211, + 84, + 165, + 50, + 150, + 218, + 168, + 83, + 203, + 208, + 89, + 67, + 61, + 112, + 107, + 85, + 101, + 142, + 161, + 87, + 232, + 88, + 255, + 243, + 64, + 196, + 21, + 26, + 225, + 134, + 202, + 84, + 97, + 135, + 36, + 187, + 188, + 235, + 181, + 99, + 254, + 173, + 23, + 191, + 24, + 128, + 10, + 35, + 101, + 9, + 252, + 182, + 55, + 79, + 4 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 5, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-06/input.png b/tests/end-to-end/structured-append-06/input.png new file mode 100644 index 00000000..28e3f1b8 Binary files /dev/null and b/tests/end-to-end/structured-append-06/input.png differ diff --git a/tests/end-to-end/structured-append-06/output.json b/tests/end-to-end/structured-append-06/output.json new file mode 100644 index 00000000..92f3f394 --- /dev/null +++ b/tests/end-to-end/structured-append-06/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 30, + 110, + 35, + 175, + 124, + 31, + 183, + 136, + 134, + 92, + 79, + 37, + 28, + 206, + 71, + 63, + 237, + 231, + 252, + 232, + 186, + 214, + 3, + 98, + 144, + 100, + 28, + 80, + 160, + 48, + 50, + 9, + 138, + 15, + 129, + 75, + 133, + 33, + 113, + 96, + 216, + 231, + 147, + 170, + 2, + 177, + 148, + 78, + 210, + 238, + 175, + 241, + 248, + 177, + 155, + 27, + 241, + 196, + 37, + 82, + 198, + 189, + 37, + 113, + 46, + 122, + 181, + 150, + 37, + 60, + 115, + 255, + 243, + 80, + 196, + 4, + 27, + 18, + 94, + 202, + 92, + 98, + 4, + 240, + 40, + 136, + 86, + 206, + 150, + 42, + 141, + 49, + 101, + 16, + 82, + 12, + 219, + 94, + 244, + 45, + 76, + 47, + 23, + 7, + 194, + 165, + 158, + 216, + 233, + 203, + 90, + 47, + 118, + 2, + 143, + 38, + 212, + 182, + 186, + 32, + 130, + 204, + 60, + 57, + 196, + 40, + 187, + 201, + 185, + 120, + 173, + 18, + 219, + 72, + 170, + 18, + 75, + 35, + 62, + 143, + 181, + 124, + 228, + 101, + 123, + 86, + 175, + 125, + 147, + 85, + 94, + 219, + 159, + 235, + 42, + 216, + 186, + 187, + 47, + 251, + 145, + 130, + 197, + 162, + 181, + 27, + 212, + 244, + 206, + 174, + 183, + 86, + 235, + 213, + 68, + 242, + 39, + 62, + 203, + 156, + 177, + 160, + 97, + 117, + 14, + 190, + 245, + 100, + 149, + 168, + 34, + 155, + 137, + 50, + 18, + 216, + 190, + 63, + 153, + 164, + 138, + 255, + 243, + 80, + 196, + 12, + 27, + 89, + 38, + 190, + 85, + 79, + 48, + 0, + 184, + 203, + 116, + 246, + 150, + 72, + 58, + 214, + 40, + 251, + 45, + 176, + 93, + 255, + 36, + 91, + 174, + 110, + 131, + 81, + 75, + 43, + 190, + 119, + 109, + 248, + 238, + 94, + 27, + 30, + 242, + 43, + 63, + 250, + 217, + 56, + 124, + 231, + 131, + 180, + 209, + 83, + 155, + 87, + 90, + 137, + 203, + 33, + 131, + 71, + 135, + 171, + 38, + 211, + 34, + 160, + 136, + 100, + 148, + 216, + 185, + 176, + 157, + 197, + 36, + 83, + 72, + 104, + 140, + 234, + 158, + 241, + 145, + 188, + 60, + 48, + 145, + 198, + 49, + 68, + 120, + 138, + 187, + 137, + 106, + 34, + 164, + 180, + 126, + 56, + 235, + 177, + 135, + 39, + 154, + 105, + 83, + 170, + 161, + 64, + 137, + 80, + 166, + 129, + 35, + 148, + 0, + 19, + 248, + 44, + 243, + 130, + 182, + 139, + 200, + 44, + 18, + 255, + 243, + 160, + 196, + 19, + 71, + 132, + 18, + 154, + 81, + 153, + 120, + 0, + 178, + 32, + 141, + 34, + 20, + 80, + 4, + 145, + 138, + 187, + 168, + 175, + 217, + 42, + 217, + 67, + 48, + 16, + 98, + 102, + 66, + 140, + 179, + 205, + 88, + 93, + 196, + 76, + 110, + 43, + 209, + 70, + 73, + 234, + 93, + 75, + 114, + 48, + 223, + 84, + 155, + 38, + 243, + 73, + 118, + 86, + 156, + 78, + 151, + 9, + 51, + 153, + 149, + 56, + 125, + 181, + 23, + 115, + 177, + 201, + 76, + 63, + 204, + 115, + 114, + 43, + 49, + 54, + 45, + 168, + 90, + 229, + 4, + 191, + 212, + 168, + 122, + 165, + 49, + 72, + 42, + 116, + 45, + 227, + 215, + 22, + 36, + 226, + 165, + 88, + 126, + 158, + 12, + 128, + 43, + 218, + 236, + 14, + 79, + 78, + 246, + 69, + 180, + 107, + 34, + 164, + 158, + 53, + 185, + 43, + 84, + 136, + 99, + 106, + 123, + 188, + 29, + 76, + 131, + 208, + 12, + 2, + 88, + 123, + 161, + 237, + 42, + 196, + 38, + 18, + 173, + 45, + 18, + 5, + 20, + 201, + 200, + 73, + 196, + 65, + 255, + 67, + 253, + 134, + 6, + 23, + 108, + 135, + 243, + 66, + 224, + 162, + 31, + 3, + 93, + 136, + 228, + 22, + 181, + 26, + 209, + 44, + 136, + 146, + 69, + 244, + 154, + 134, + 55, + 77, + 57, + 75, + 120, + 137, + 27, + 171, + 97, + 81, + 252, + 115, + 185, + 250, + 145, + 226, + 33, + 89, + 59, + 59, + 216, + 209, + 154, + 167, + 102, + 109, + 171, + 211, + 45, + 250, + 112, + 77, + 252, + 35, + 144, + 232, + 100, + 6, + 216, + 255, + 178, + 177, + 8, + 105, + 106, + 108, + 111, + 132, + 235, + 44, + 17, + 157, + 82, + 141, + 144, + 45, + 36, + 25, + 253, + 113, + 182, + 150, + 214, + 233, + 92, + 114, + 253, + 191, + 76, + 214, + 129, + 142 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 6, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 30, + 110, + 35, + 175, + 124, + 31, + 183, + 136, + 134, + 92, + 79, + 37, + 28, + 206, + 71, + 63, + 237, + 231, + 252, + 232, + 186, + 214, + 3, + 98, + 144, + 100, + 28, + 80, + 160, + 48, + 50, + 9, + 138, + 15, + 129, + 75, + 133, + 33, + 113, + 96, + 216, + 231, + 147, + 170, + 2, + 177, + 148, + 78, + 210, + 238, + 175, + 241, + 248, + 177, + 155, + 27, + 241, + 196, + 37, + 82, + 198, + 189, + 37, + 113, + 46, + 122, + 181, + 150, + 37, + 60, + 115, + 255, + 243, + 80, + 196, + 4, + 27, + 18, + 94, + 202, + 92, + 98, + 4, + 240, + 40, + 136, + 86, + 206, + 150, + 42, + 141, + 49, + 101, + 16, + 82, + 12, + 219, + 94, + 244, + 45, + 76, + 47, + 23, + 7, + 194, + 165, + 158, + 216, + 233, + 203, + 90, + 47, + 118, + 2, + 143, + 38, + 212, + 182, + 186, + 32, + 130, + 204, + 60, + 57, + 196, + 40, + 187, + 201, + 185, + 120, + 173, + 18, + 219, + 72, + 170, + 18, + 75, + 35, + 62, + 143, + 181, + 124, + 228, + 101, + 123, + 86, + 175, + 125, + 147, + 85, + 94, + 219, + 159, + 235, + 42, + 216, + 186, + 187, + 47, + 251, + 145, + 130, + 197, + 162, + 181, + 27, + 212, + 244, + 206, + 174, + 183, + 86, + 235, + 213, + 68, + 242, + 39, + 62, + 203, + 156, + 177, + 160, + 97, + 117, + 14, + 190, + 245, + 100, + 149, + 168, + 34, + 155, + 137, + 50, + 18, + 216, + 190, + 63, + 153, + 164, + 138, + 255, + 243, + 80, + 196, + 12, + 27, + 89, + 38, + 190, + 85, + 79, + 48, + 0, + 184, + 203, + 116, + 246, + 150, + 72, + 58, + 214, + 40, + 251, + 45, + 176, + 93, + 255, + 36, + 91, + 174, + 110, + 131, + 81, + 75, + 43, + 190, + 119, + 109, + 248, + 238, + 94, + 27, + 30, + 242, + 43, + 63, + 250, + 217, + 56, + 124, + 231, + 131, + 180, + 209, + 83, + 155, + 87, + 90, + 137, + 203, + 33, + 131, + 71, + 135, + 171, + 38, + 211, + 34, + 160, + 136, + 100, + 148, + 216, + 185, + 176, + 157, + 197, + 36, + 83, + 72, + 104, + 140, + 234, + 158, + 241, + 145, + 188, + 60, + 48, + 145, + 198, + 49, + 68, + 120, + 138, + 187, + 137, + 106, + 34, + 164, + 180, + 126, + 56, + 235, + 177, + 135, + 39, + 154, + 105, + 83, + 170, + 161, + 64, + 137, + 80, + 166, + 129, + 35, + 148, + 0, + 19, + 248, + 44, + 243, + 130, + 182, + 139, + 200, + 44, + 18, + 255, + 243, + 160, + 196, + 19, + 71, + 132, + 18, + 154, + 81, + 153, + 120, + 0, + 178, + 32, + 141, + 34, + 20, + 80, + 4, + 145, + 138, + 187, + 168, + 175, + 217, + 42, + 217, + 67, + 48, + 16, + 98, + 102, + 66, + 140, + 179, + 205, + 88, + 93, + 196, + 76, + 110, + 43, + 209, + 70, + 73, + 234, + 93, + 75, + 114, + 48, + 223, + 84, + 155, + 38, + 243, + 73, + 118, + 86, + 156, + 78, + 151, + 9, + 51, + 153, + 149, + 56, + 125, + 181, + 23, + 115, + 177, + 201, + 76, + 63, + 204, + 115, + 114, + 43, + 49, + 54, + 45, + 168, + 90, + 229, + 4, + 191, + 212, + 168, + 122, + 165, + 49, + 72, + 42, + 116, + 45, + 227, + 215, + 22, + 36, + 226, + 165, + 88, + 126, + 158, + 12, + 128, + 43, + 218, + 236, + 14, + 79, + 78, + 246, + 69, + 180, + 107, + 34, + 164, + 158, + 53, + 185, + 43, + 84, + 136, + 99, + 106, + 123, + 188, + 29, + 76, + 131, + 208, + 12, + 2, + 88, + 123, + 161, + 237, + 42, + 196, + 38, + 18, + 173, + 45, + 18, + 5, + 20, + 201, + 200, + 73, + 196, + 65, + 255, + 67, + 253, + 134, + 6, + 23, + 108, + 135, + 243, + 66, + 224, + 162, + 31, + 3, + 93, + 136, + 228, + 22, + 181, + 26, + 209, + 44, + 136, + 146, + 69, + 244, + 154, + 134, + 55, + 77, + 57, + 75, + 120, + 137, + 27, + 171, + 97, + 81, + 252, + 115, + 185, + 250, + 145, + 226, + 33, + 89, + 59, + 59, + 216, + 209, + 154, + 167, + 102, + 109, + 171, + 211, + 45, + 250, + 112, + 77, + 252, + 35, + 144, + 232, + 100, + 6, + 216, + 255, + 178, + 177, + 8, + 105, + 106, + 108, + 111, + 132, + 235, + 44, + 17, + 157, + 82, + 141, + 144, + 45, + 36, + 25, + 253, + 113, + 182, + 150, + 214, + 233, + 92, + 114, + 253, + 191, + 76, + 214, + 129, + 142 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 6, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-07/input.png b/tests/end-to-end/structured-append-07/input.png new file mode 100644 index 00000000..525bf93d Binary files /dev/null and b/tests/end-to-end/structured-append-07/input.png differ diff --git a/tests/end-to-end/structured-append-07/output.json b/tests/end-to-end/structured-append-07/output.json new file mode 100644 index 00000000..a01b3ffe --- /dev/null +++ b/tests/end-to-end/structured-append-07/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 242, + 123, + 82, + 54, + 226, + 7, + 32, + 176, + 100, + 184, + 33, + 142, + 42, + 242, + 222, + 131, + 88, + 138, + 184, + 103, + 115, + 102, + 153, + 118, + 228, + 164, + 89, + 140, + 32, + 17, + 85, + 197, + 91, + 85, + 202, + 1, + 0, + 41, + 49, + 129, + 178, + 241, + 209, + 44, + 53, + 100, + 188, + 2, + 157, + 157, + 146, + 145, + 237, + 73, + 84, + 140, + 69, + 21, + 109, + 111, + 255, + 243, + 160, + 196, + 33, + 70, + 92, + 10, + 170, + 89, + 152, + 120, + 1, + 147, + 89, + 104, + 129, + 48, + 126, + 8, + 168, + 13, + 7, + 34, + 64, + 130, + 157, + 201, + 50, + 68, + 151, + 106, + 7, + 92, + 67, + 198, + 19, + 182, + 226, + 228, + 175, + 92, + 182, + 188, + 85, + 53, + 196, + 109, + 92, + 19, + 194, + 252, + 57, + 8, + 113, + 235, + 72, + 5, + 176, + 92, + 206, + 6, + 102, + 52, + 208, + 164, + 171, + 15, + 101, + 97, + 250, + 240, + 67, + 81, + 2, + 220, + 105, + 23, + 109, + 34, + 147, + 202, + 215, + 12, + 99, + 189, + 90, + 97, + 100, + 121, + 12, + 199, + 108, + 131, + 1, + 22, + 135, + 71, + 11, + 210, + 5, + 139, + 196, + 123, + 30, + 19, + 145, + 206, + 159, + 204, + 5, + 114, + 181, + 56, + 176, + 192, + 103, + 63, + 19, + 101, + 96, + 155, + 22, + 35, + 169, + 93, + 137, + 20, + 106, + 21, + 133, + 35, + 180, + 193, + 125, + 70, + 174, + 106, + 216, + 187, + 121, + 131, + 136, + 45, + 77, + 168, + 74, + 132, + 201, + 81, + 37, + 232, + 196, + 231, + 5, + 77, + 16, + 219, + 158, + 19, + 193, + 206, + 33, + 72, + 115, + 212, + 203, + 111, + 156, + 244, + 68, + 146, + 102, + 163, + 252, + 207, + 97, + 135, + 146, + 218, + 120, + 44, + 183, + 156, + 172, + 139, + 8, + 198, + 80, + 128, + 182, + 58, + 83, + 173, + 246, + 88, + 76, + 229, + 253, + 149, + 116, + 172, + 134, + 121, + 196, + 46, + 205, + 43, + 106, + 119, + 24, + 7, + 41, + 97, + 174, + 210, + 72, + 151, + 176, + 32, + 229, + 201, + 159, + 81, + 170, + 246, + 105, + 85, + 174, + 17, + 149, + 106, + 248, + 251, + 110, + 72, + 185, + 238, + 215, + 235, + 47, + 28, + 55, + 69, + 222, + 62, + 33, + 172, + 192, + 117, + 62, + 108, + 231, + 172, + 77, + 104, + 242, + 55, + 234, + 118, + 178, + 213, + 113, + 146, + 156, + 182, + 86, + 128, + 2, + 152, + 155, + 237, + 184, + 172, + 144, + 132, + 227, + 57, + 133, + 150, + 182, + 127, + 247, + 5, + 198, + 20, + 45, + 255, + 169, + 50, + 31, + 16, + 174, + 83, + 20, + 76, + 209, + 76, + 200, + 231, + 9, + 146, + 198, + 56, + 124, + 113, + 209, + 140, + 100, + 163, + 80, + 70, + 194, + 255, + 243, + 64, + 196, + 51, + 30, + 123, + 62, + 202, + 93, + 207, + 40, + 0, + 140, + 30, + 15, + 21, + 84, + 179, + 223, + 111, + 249, + 53, + 69, + 163, + 158, + 164, + 200, + 58, + 48, + 114, + 58, + 49, + 20, + 236, + 253, + 85, + 210, + 207, + 122, + 61, + 109, + 85, + 113, + 7, + 176, + 235, + 16, + 202, + 218, + 58, + 27, + 82, + 216, + 239, + 69, + 229, + 195, + 143, + 222, + 119, + 124, + 167, + 230, + 125, + 177, + 142, + 34, + 193, + 3, + 37, + 117, + 131, + 102, + 88, + 234, + 216, + 196, + 2, + 176, + 250, + 90, + 165, + 214, + 108, + 206, + 173, + 222, + 230, + 208, + 45, + 187, + 29, + 191, + 108, + 9, + 200, + 16, + 217, + 243, + 150, + 105, + 204, + 210, + 255, + 243, + 80, + 196, + 20, + 30, + 107, + 198, + 214, + 94, + 121, + 138, + 153, + 153, + 95, + 184, + 91, + 128, + 27, + 177, + 178, + 165, + 147, + 89, + 136, + 30, + 79, + 81, + 195, + 10, + 84, + 111, + 199, + 187, + 54, + 50, + 41, + 61, + 110, + 241, + 31, + 187, + 234, + 48, + 72, + 72, + 83, + 215, + 175, + 103, + 218, + 136, + 149, + 70, + 153, + 219, + 214, + 57, + 208, + 247, + 210, + 228, + 126, + 222, + 159, + 73, + 138, + 219, + 177, + 78, + 170, + 74, + 137, + 145, + 74, + 84, + 87, + 35, + 54, + 133, + 109, + 17, + 219, + 61, + 70, + 130, + 37, + 235, + 73, + 10, + 84, + 43, + 197, + 180, + 162, + 26, + 236, + 202, + 165, + 84, + 249, + 136, + 159, + 252, + 229, + 70, + 68 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 7, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 242, + 123, + 82, + 54, + 226, + 7, + 32, + 176, + 100, + 184, + 33, + 142, + 42, + 242, + 222, + 131, + 88, + 138, + 184, + 103, + 115, + 102, + 153, + 118, + 228, + 164, + 89, + 140, + 32, + 17, + 85, + 197, + 91, + 85, + 202, + 1, + 0, + 41, + 49, + 129, + 178, + 241, + 209, + 44, + 53, + 100, + 188, + 2, + 157, + 157, + 146, + 145, + 237, + 73, + 84, + 140, + 69, + 21, + 109, + 111, + 255, + 243, + 160, + 196, + 33, + 70, + 92, + 10, + 170, + 89, + 152, + 120, + 1, + 147, + 89, + 104, + 129, + 48, + 126, + 8, + 168, + 13, + 7, + 34, + 64, + 130, + 157, + 201, + 50, + 68, + 151, + 106, + 7, + 92, + 67, + 198, + 19, + 182, + 226, + 228, + 175, + 92, + 182, + 188, + 85, + 53, + 196, + 109, + 92, + 19, + 194, + 252, + 57, + 8, + 113, + 235, + 72, + 5, + 176, + 92, + 206, + 6, + 102, + 52, + 208, + 164, + 171, + 15, + 101, + 97, + 250, + 240, + 67, + 81, + 2, + 220, + 105, + 23, + 109, + 34, + 147, + 202, + 215, + 12, + 99, + 189, + 90, + 97, + 100, + 121, + 12, + 199, + 108, + 131, + 1, + 22, + 135, + 71, + 11, + 210, + 5, + 139, + 196, + 123, + 30, + 19, + 145, + 206, + 159, + 204, + 5, + 114, + 181, + 56, + 176, + 192, + 103, + 63, + 19, + 101, + 96, + 155, + 22, + 35, + 169, + 93, + 137, + 20, + 106, + 21, + 133, + 35, + 180, + 193, + 125, + 70, + 174, + 106, + 216, + 187, + 121, + 131, + 136, + 45, + 77, + 168, + 74, + 132, + 201, + 81, + 37, + 232, + 196, + 231, + 5, + 77, + 16, + 219, + 158, + 19, + 193, + 206, + 33, + 72, + 115, + 212, + 203, + 111, + 156, + 244, + 68, + 146, + 102, + 163, + 252, + 207, + 97, + 135, + 146, + 218, + 120, + 44, + 183, + 156, + 172, + 139, + 8, + 198, + 80, + 128, + 182, + 58, + 83, + 173, + 246, + 88, + 76, + 229, + 253, + 149, + 116, + 172, + 134, + 121, + 196, + 46, + 205, + 43, + 106, + 119, + 24, + 7, + 41, + 97, + 174, + 210, + 72, + 151, + 176, + 32, + 229, + 201, + 159, + 81, + 170, + 246, + 105, + 85, + 174, + 17, + 149, + 106, + 248, + 251, + 110, + 72, + 185, + 238, + 215, + 235, + 47, + 28, + 55, + 69, + 222, + 62, + 33, + 172, + 192, + 117, + 62, + 108, + 231, + 172, + 77, + 104, + 242, + 55, + 234, + 118, + 178, + 213, + 113, + 146, + 156, + 182, + 86, + 128, + 2, + 152, + 155, + 237, + 184, + 172, + 144, + 132, + 227, + 57, + 133, + 150, + 182, + 127, + 247, + 5, + 198, + 20, + 45, + 255, + 169, + 50, + 31, + 16, + 174, + 83, + 20, + 76, + 209, + 76, + 200, + 231, + 9, + 146, + 198, + 56, + 124, + 113, + 209, + 140, + 100, + 163, + 80, + 70, + 194, + 255, + 243, + 64, + 196, + 51, + 30, + 123, + 62, + 202, + 93, + 207, + 40, + 0, + 140, + 30, + 15, + 21, + 84, + 179, + 223, + 111, + 249, + 53, + 69, + 163, + 158, + 164, + 200, + 58, + 48, + 114, + 58, + 49, + 20, + 236, + 253, + 85, + 210, + 207, + 122, + 61, + 109, + 85, + 113, + 7, + 176, + 235, + 16, + 202, + 218, + 58, + 27, + 82, + 216, + 239, + 69, + 229, + 195, + 143, + 222, + 119, + 124, + 167, + 230, + 125, + 177, + 142, + 34, + 193, + 3, + 37, + 117, + 131, + 102, + 88, + 234, + 216, + 196, + 2, + 176, + 250, + 90, + 165, + 214, + 108, + 206, + 173, + 222, + 230, + 208, + 45, + 187, + 29, + 191, + 108, + 9, + 200, + 16, + 217, + 243, + 150, + 105, + 204, + 210, + 255, + 243, + 80, + 196, + 20, + 30, + 107, + 198, + 214, + 94, + 121, + 138, + 153, + 153, + 95, + 184, + 91, + 128, + 27, + 177, + 178, + 165, + 147, + 89, + 136, + 30, + 79, + 81, + 195, + 10, + 84, + 111, + 199, + 187, + 54, + 50, + 41, + 61, + 110, + 241, + 31, + 187, + 234, + 48, + 72, + 72, + 83, + 215, + 175, + 103, + 218, + 136, + 149, + 70, + 153, + 219, + 214, + 57, + 208, + 247, + 210, + 228, + 126, + 222, + 159, + 73, + 138, + 219, + 177, + 78, + 170, + 74, + 137, + 145, + 74, + 84, + 87, + 35, + 54, + 133, + 109, + 17, + 219, + 61, + 70, + 130, + 37, + 235, + 73, + 10, + 84, + 43, + 197, + 180, + 162, + 26, + 236, + 202, + 165, + 84, + 249, + 136, + 159, + 252, + 229, + 70, + 68 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 7, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-08/input.png b/tests/end-to-end/structured-append-08/input.png new file mode 100644 index 00000000..f380f2fb Binary files /dev/null and b/tests/end-to-end/structured-append-08/input.png differ diff --git a/tests/end-to-end/structured-append-08/output.json b/tests/end-to-end/structured-append-08/output.json new file mode 100644 index 00000000..f0e78bf4 --- /dev/null +++ b/tests/end-to-end/structured-append-08/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 44, + 162, + 163, + 129, + 62, + 19, + 188, + 101, + 71, + 24, + 51, + 55, + 237, + 91, + 73, + 139, + 180, + 214, + 11, + 224, + 26, + 240, + 48, + 255, + 243, + 80, + 196, + 15, + 28, + 17, + 34, + 214, + 252, + 194, + 77, + 0, + 64, + 171, + 101, + 139, + 178, + 28, + 14, + 130, + 152, + 163, + 253, + 252, + 154, + 195, + 145, + 28, + 144, + 83, + 247, + 255, + 26, + 123, + 253, + 169, + 44, + 114, + 213, + 173, + 48, + 1, + 196, + 78, + 131, + 239, + 20, + 9, + 209, + 192, + 12, + 72, + 91, + 22, + 145, + 231, + 2, + 60, + 199, + 199, + 8, + 197, + 147, + 189, + 42, + 31, + 60, + 252, + 163, + 138, + 41, + 166, + 12, + 8, + 21, + 90, + 149, + 173, + 225, + 231, + 174, + 84, + 113, + 52, + 141, + 22, + 23, + 52, + 191, + 176, + 174, + 124, + 58, + 186, + 117, + 180, + 226, + 58, + 59, + 127, + 221, + 28, + 196, + 111, + 234, + 255, + 109, + 254, + 235, + 149, + 96, + 94, + 250, + 185, + 102, + 188, + 106, + 59, + 61, + 136, + 237, + 16, + 76, + 109, + 2, + 42, + 94, + 44, + 26, + 255, + 243, + 80, + 196, + 19, + 27, + 153, + 78, + 217, + 148, + 98, + 70, + 88, + 100, + 136, + 154, + 101, + 114, + 159, + 44, + 200, + 170, + 67, + 192, + 82, + 88, + 27, + 247, + 154, + 161, + 130, + 48, + 87, + 18, + 219, + 30, + 61, + 134, + 117, + 143, + 95, + 135, + 30, + 192, + 133, + 76, + 198, + 170, + 105, + 92, + 64, + 108, + 78, + 9, + 7, + 196, + 128, + 192, + 144, + 44, + 72, + 94, + 133, + 5, + 192, + 7, + 144, + 30, + 8, + 11, + 173, + 141, + 156, + 109, + 207, + 164, + 210, + 30, + 17, + 176, + 224, + 52, + 0, + 181, + 23, + 107, + 127, + 250, + 25, + 148, + 141, + 180, + 89, + 200, + 22, + 186, + 196, + 188, + 38, + 85, + 149, + 57, + 94, + 97, + 10, + 17, + 152, + 130, + 92, + 130, + 116, + 227, + 212, + 115, + 200, + 162, + 148, + 114, + 69, + 101, + 89, + 235, + 144, + 134, + 47, + 144, + 212, + 49, + 137, + 97, + 255, + 243, + 64, + 196, + 25, + 26, + 209, + 38, + 197, + 178, + 51, + 6, + 104, + 251, + 174, + 225, + 158, + 17, + 145, + 153, + 218, + 112, + 48, + 80, + 174, + 196, + 20, + 100, + 59, + 142, + 166, + 120, + 95, + 123, + 192, + 64, + 136, + 56, + 210, + 172, + 81, + 242, + 176, + 144, + 88, + 233, + 25, + 26, + 65, + 181, + 172, + 2, + 212, + 13, + 80, + 148, + 153, + 48, + 37, + 140, + 26, + 195, + 227, + 6, + 193, + 65, + 97, + 72, + 80, + 50, + 48, + 112, + 181, + 68, + 84, + 153, + 228, + 2, + 202, + 35, + 225, + 173, + 149, + 78, + 181, + 94, + 248, + 139, + 176, + 161, + 103, + 54, + 133, + 30, + 74, + 106, + 106, + 215, + 127, + 148, + 1, + 143, + 218, + 67, + 255, + 243, + 80, + 196, + 8, + 27, + 138, + 206, + 197, + 148, + 97, + 132, + 152, + 75, + 3, + 236, + 4, + 230, + 182, + 197, + 132, + 6, + 22, + 2, + 118, + 35, + 51, + 237, + 59, + 109, + 246, + 220, + 34, + 36, + 251, + 184, + 151, + 243, + 14, + 148, + 167, + 173, + 176, + 207, + 113, + 150, + 158, + 43, + 85, + 38, + 119, + 116, + 101, + 116, + 65, + 13, + 57, + 25, + 108, + 231, + 68, + 73, + 222, + 143, + 171, + 255, + 76, + 224, + 154, + 180, + 73, + 239, + 145, + 217, + 183, + 209, + 228, + 127, + 151, + 231, + 74, + 19, + 34, + 189, + 30, + 126, + 77, + 247, + 186, + 7, + 13, + 188, + 16, + 91, + 100, + 226, + 0, + 35, + 3, + 232, + 91, + 60, + 218, + 132, + 23, + 134, + 101, + 10, + 23, + 78, + 168, + 156, + 90, + 229, + 205, + 85, + 44, + 70, + 155, + 85, + 199, + 16, + 6, + 212, + 107, + 85, + 44, + 9, + 84, + 36, + 255, + 243, + 80, + 196, + 14, + 26, + 195, + 66, + 218, + 92, + 64, + 71, + 177, + 24, + 29, + 137, + 7, + 170, + 172, + 138, + 187, + 117, + 23, + 81, + 223, + 29, + 7, + 178, + 50, + 14, + 89, + 88, + 95, + 94, + 202, + 121, + 125, + 110, + 103, + 25, + 55, + 236, + 221, + 202, + 208, + 179, + 209, + 165, + 30, + 116, + 138, + 173, + 18, + 106, + 8, + 228, + 32, + 148, + 39, + 127, + 250, + 135, + 101, + 249, + 151, + 231, + 158 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 8, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 44, + 162, + 163, + 129, + 62, + 19, + 188, + 101, + 71, + 24, + 51, + 55, + 237, + 91, + 73, + 139, + 180, + 214, + 11, + 224, + 26, + 240, + 48, + 255, + 243, + 80, + 196, + 15, + 28, + 17, + 34, + 214, + 252, + 194, + 77, + 0, + 64, + 171, + 101, + 139, + 178, + 28, + 14, + 130, + 152, + 163, + 253, + 252, + 154, + 195, + 145, + 28, + 144, + 83, + 247, + 255, + 26, + 123, + 253, + 169, + 44, + 114, + 213, + 173, + 48, + 1, + 196, + 78, + 131, + 239, + 20, + 9, + 209, + 192, + 12, + 72, + 91, + 22, + 145, + 231, + 2, + 60, + 199, + 199, + 8, + 197, + 147, + 189, + 42, + 31, + 60, + 252, + 163, + 138, + 41, + 166, + 12, + 8, + 21, + 90, + 149, + 173, + 225, + 231, + 174, + 84, + 113, + 52, + 141, + 22, + 23, + 52, + 191, + 176, + 174, + 124, + 58, + 186, + 117, + 180, + 226, + 58, + 59, + 127, + 221, + 28, + 196, + 111, + 234, + 255, + 109, + 254, + 235, + 149, + 96, + 94, + 250, + 185, + 102, + 188, + 106, + 59, + 61, + 136, + 237, + 16, + 76, + 109, + 2, + 42, + 94, + 44, + 26, + 255, + 243, + 80, + 196, + 19, + 27, + 153, + 78, + 217, + 148, + 98, + 70, + 88, + 100, + 136, + 154, + 101, + 114, + 159, + 44, + 200, + 170, + 67, + 192, + 82, + 88, + 27, + 247, + 154, + 161, + 130, + 48, + 87, + 18, + 219, + 30, + 61, + 134, + 117, + 143, + 95, + 135, + 30, + 192, + 133, + 76, + 198, + 170, + 105, + 92, + 64, + 108, + 78, + 9, + 7, + 196, + 128, + 192, + 144, + 44, + 72, + 94, + 133, + 5, + 192, + 7, + 144, + 30, + 8, + 11, + 173, + 141, + 156, + 109, + 207, + 164, + 210, + 30, + 17, + 176, + 224, + 52, + 0, + 181, + 23, + 107, + 127, + 250, + 25, + 148, + 141, + 180, + 89, + 200, + 22, + 186, + 196, + 188, + 38, + 85, + 149, + 57, + 94, + 97, + 10, + 17, + 152, + 130, + 92, + 130, + 116, + 227, + 212, + 115, + 200, + 162, + 148, + 114, + 69, + 101, + 89, + 235, + 144, + 134, + 47, + 144, + 212, + 49, + 137, + 97, + 255, + 243, + 64, + 196, + 25, + 26, + 209, + 38, + 197, + 178, + 51, + 6, + 104, + 251, + 174, + 225, + 158, + 17, + 145, + 153, + 218, + 112, + 48, + 80, + 174, + 196, + 20, + 100, + 59, + 142, + 166, + 120, + 95, + 123, + 192, + 64, + 136, + 56, + 210, + 172, + 81, + 242, + 176, + 144, + 88, + 233, + 25, + 26, + 65, + 181, + 172, + 2, + 212, + 13, + 80, + 148, + 153, + 48, + 37, + 140, + 26, + 195, + 227, + 6, + 193, + 65, + 97, + 72, + 80, + 50, + 48, + 112, + 181, + 68, + 84, + 153, + 228, + 2, + 202, + 35, + 225, + 173, + 149, + 78, + 181, + 94, + 248, + 139, + 176, + 161, + 103, + 54, + 133, + 30, + 74, + 106, + 106, + 215, + 127, + 148, + 1, + 143, + 218, + 67, + 255, + 243, + 80, + 196, + 8, + 27, + 138, + 206, + 197, + 148, + 97, + 132, + 152, + 75, + 3, + 236, + 4, + 230, + 182, + 197, + 132, + 6, + 22, + 2, + 118, + 35, + 51, + 237, + 59, + 109, + 246, + 220, + 34, + 36, + 251, + 184, + 151, + 243, + 14, + 148, + 167, + 173, + 176, + 207, + 113, + 150, + 158, + 43, + 85, + 38, + 119, + 116, + 101, + 116, + 65, + 13, + 57, + 25, + 108, + 231, + 68, + 73, + 222, + 143, + 171, + 255, + 76, + 224, + 154, + 180, + 73, + 239, + 145, + 217, + 183, + 209, + 228, + 127, + 151, + 231, + 74, + 19, + 34, + 189, + 30, + 126, + 77, + 247, + 186, + 7, + 13, + 188, + 16, + 91, + 100, + 226, + 0, + 35, + 3, + 232, + 91, + 60, + 218, + 132, + 23, + 134, + 101, + 10, + 23, + 78, + 168, + 156, + 90, + 229, + 205, + 85, + 44, + 70, + 155, + 85, + 199, + 16, + 6, + 212, + 107, + 85, + 44, + 9, + 84, + 36, + 255, + 243, + 80, + 196, + 14, + 26, + 195, + 66, + 218, + 92, + 64, + 71, + 177, + 24, + 29, + 137, + 7, + 170, + 172, + 138, + 187, + 117, + 23, + 81, + 223, + 29, + 7, + 178, + 50, + 14, + 89, + 88, + 95, + 94, + 202, + 121, + 125, + 110, + 103, + 25, + 55, + 236, + 221, + 202, + 208, + 179, + 209, + 165, + 30, + 116, + 138, + 173, + 18, + 106, + 8, + 228, + 32, + 148, + 39, + 127, + 250, + 135, + 101, + 249, + 151, + 231, + 158 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 8, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-09/input.png b/tests/end-to-end/structured-append-09/input.png new file mode 100644 index 00000000..367cbf61 Binary files /dev/null and b/tests/end-to-end/structured-append-09/input.png differ diff --git a/tests/end-to-end/structured-append-09/output.json b/tests/end-to-end/structured-append-09/output.json new file mode 100644 index 00000000..befb8640 --- /dev/null +++ b/tests/end-to-end/structured-append-09/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 255, + 255, + 148, + 254, + 113, + 150, + 165, + 194, + 75, + 228, + 108, + 226, + 20, + 52, + 70, + 119, + 176, + 159, + 212, + 140, + 72, + 13, + 237, + 53, + 23, + 145, + 207, + 153, + 223, + 111, + 125, + 212, + 144, + 99, + 170, + 83, + 152, + 255, + 85, + 68, + 42, + 228, + 73, + 82, + 3, + 45, + 28, + 218, + 22, + 98, + 110, + 143, + 68, + 124, + 208, + 72, + 188, + 166, + 115, + 11, + 40, + 93, + 103, + 255, + 243, + 64, + 196, + 24, + 26, + 147, + 66, + 198, + 82, + 96, + 196, + 212, + 159, + 20, + 92, + 172, + 98, + 154, + 14, + 97, + 109, + 172, + 118, + 145, + 4, + 206, + 169, + 82, + 221, + 215, + 175, + 73, + 155, + 87, + 170, + 226, + 153, + 20, + 20, + 155, + 191, + 191, + 186, + 221, + 84, + 137, + 123, + 106, + 142, + 215, + 101, + 78, + 56, + 146, + 236, + 247, + 71, + 209, + 27, + 181, + 181, + 164, + 73, + 80, + 245, + 102, + 215, + 74, + 146, + 134, + 202, + 221, + 19, + 108, + 153, + 31, + 93, + 52, + 181, + 190, + 197, + 123, + 14, + 44, + 119, + 117, + 252, + 234, + 163, + 49, + 66, + 138, + 170, + 171, + 21, + 40, + 168, + 28, + 109, + 66, + 131, + 204, + 23, + 255, + 243, + 80, + 196, + 8, + 27, + 10, + 122, + 194, + 82, + 122, + 70, + 144, + 239, + 40, + 198, + 162, + 108, + 126, + 246, + 59, + 195, + 176, + 138, + 86, + 46, + 220, + 154, + 28, + 126, + 227, + 11, + 166, + 206, + 108, + 98, + 141, + 70, + 77, + 109, + 93, + 226, + 57, + 67, + 225, + 87, + 132, + 123, + 240, + 187, + 145, + 39, + 121, + 55, + 23, + 97, + 131, + 144, + 255, + 203, + 231, + 191, + 186, + 126, + 156, + 75, + 207, + 249, + 237, + 82, + 18, + 75, + 85, + 255, + 69, + 135, + 253, + 207, + 58, + 191, + 247, + 21, + 155, + 120, + 42, + 126, + 37, + 136, + 11, + 234, + 166, + 86, + 33, + 121, + 220, + 74, + 2, + 160, + 125, + 102, + 1, + 18, + 34, + 161, + 208, + 197, + 139, + 217, + 82, + 145, + 196, + 211, + 84, + 170, + 38, + 234, + 203, + 149, + 106, + 0, + 53, + 170, + 154, + 203, + 233, + 81, + 216, + 199, + 132, + 200, + 255, + 243, + 80, + 196, + 16, + 27, + 40, + 230, + 210, + 84, + 203, + 210, + 112, + 40, + 188, + 35, + 131, + 34, + 122, + 236, + 115, + 28, + 227, + 17, + 217, + 152, + 155, + 175, + 166, + 254, + 34, + 94, + 37, + 168, + 230, + 18, + 3, + 76, + 82, + 26, + 36, + 96, + 218, + 54, + 162, + 198, + 230, + 193, + 61, + 139, + 123, + 208, + 78, + 76, + 40, + 22, + 48, + 14, + 146, + 30, + 81, + 171, + 97, + 66, + 135, + 55, + 139, + 67, + 5, + 14, + 14, + 47, + 165, + 107, + 22, + 118, + 65, + 136, + 122, + 242, + 102, + 28, + 183, + 244, + 135, + 182, + 147, + 0, + 127, + 148, + 225, + 112, + 254, + 164, + 185, + 139, + 100, + 86, + 239, + 151, + 242, + 236, + 221, + 77, + 56, + 173, + 149, + 50, + 124, + 113, + 219, + 183, + 241, + 233, + 114, + 75, + 23, + 110, + 60, + 128, + 218, + 169, + 102, + 141, + 46, + 199, + 208, + 128, + 129, + 88, + 255, + 243, + 64, + 196, + 24, + 27, + 34, + 22, + 210, + 82, + 97, + 134, + 228, + 66, + 22, + 50, + 249, + 151, + 247, + 215, + 3, + 134, + 74, + 175, + 116, + 241, + 187, + 17, + 174, + 147, + 99, + 43, + 118, + 54, + 96, + 225, + 226, + 67, + 121, + 191, + 177, + 92, + 250, + 95, + 237, + 171, + 53, + 42, + 130, + 198, + 172, + 117, + 175, + 59, + 249, + 167, + 174, + 165, + 97, + 73, + 79, + 200, + 137, + 243, + 48, + 96, + 133, + 152, + 19, + 80, + 176, + 177, + 228, + 201, + 208, + 205, + 2, + 210, + 192, + 88, + 0, + 155, + 29, + 42, + 134, + 104, + 211, + 176, + 233, + 106, + 212, + 255, + 69, + 55, + 237, + 115, + 210, + 181, + 248, + 248, + 156, + 109, + 252, + 128, + 255, + 243, + 80, + 196, + 6, + 27, + 57, + 122, + 198, + 84, + 123, + 6, + 20, + 176, + 105, + 34, + 160, + 50, + 134, + 120, + 203, + 170, + 201, + 247, + 177, + 73, + 199, + 23, + 213, + 8, + 49, + 114, + 11, + 24, + 145, + 47, + 48, + 102, + 66, + 208, + 26, + 58, + 24, + 8, + 136, + 23, + 254, + 123, + 33, + 129, + 92, + 82, + 166 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 9, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 255, + 255, + 148, + 254, + 113, + 150, + 165, + 194, + 75, + 228, + 108, + 226, + 20, + 52, + 70, + 119, + 176, + 159, + 212, + 140, + 72, + 13, + 237, + 53, + 23, + 145, + 207, + 153, + 223, + 111, + 125, + 212, + 144, + 99, + 170, + 83, + 152, + 255, + 85, + 68, + 42, + 228, + 73, + 82, + 3, + 45, + 28, + 218, + 22, + 98, + 110, + 143, + 68, + 124, + 208, + 72, + 188, + 166, + 115, + 11, + 40, + 93, + 103, + 255, + 243, + 64, + 196, + 24, + 26, + 147, + 66, + 198, + 82, + 96, + 196, + 212, + 159, + 20, + 92, + 172, + 98, + 154, + 14, + 97, + 109, + 172, + 118, + 145, + 4, + 206, + 169, + 82, + 221, + 215, + 175, + 73, + 155, + 87, + 170, + 226, + 153, + 20, + 20, + 155, + 191, + 191, + 186, + 221, + 84, + 137, + 123, + 106, + 142, + 215, + 101, + 78, + 56, + 146, + 236, + 247, + 71, + 209, + 27, + 181, + 181, + 164, + 73, + 80, + 245, + 102, + 215, + 74, + 146, + 134, + 202, + 221, + 19, + 108, + 153, + 31, + 93, + 52, + 181, + 190, + 197, + 123, + 14, + 44, + 119, + 117, + 252, + 234, + 163, + 49, + 66, + 138, + 170, + 171, + 21, + 40, + 168, + 28, + 109, + 66, + 131, + 204, + 23, + 255, + 243, + 80, + 196, + 8, + 27, + 10, + 122, + 194, + 82, + 122, + 70, + 144, + 239, + 40, + 198, + 162, + 108, + 126, + 246, + 59, + 195, + 176, + 138, + 86, + 46, + 220, + 154, + 28, + 126, + 227, + 11, + 166, + 206, + 108, + 98, + 141, + 70, + 77, + 109, + 93, + 226, + 57, + 67, + 225, + 87, + 132, + 123, + 240, + 187, + 145, + 39, + 121, + 55, + 23, + 97, + 131, + 144, + 255, + 203, + 231, + 191, + 186, + 126, + 156, + 75, + 207, + 249, + 237, + 82, + 18, + 75, + 85, + 255, + 69, + 135, + 253, + 207, + 58, + 191, + 247, + 21, + 155, + 120, + 42, + 126, + 37, + 136, + 11, + 234, + 166, + 86, + 33, + 121, + 220, + 74, + 2, + 160, + 125, + 102, + 1, + 18, + 34, + 161, + 208, + 197, + 139, + 217, + 82, + 145, + 196, + 211, + 84, + 170, + 38, + 234, + 203, + 149, + 106, + 0, + 53, + 170, + 154, + 203, + 233, + 81, + 216, + 199, + 132, + 200, + 255, + 243, + 80, + 196, + 16, + 27, + 40, + 230, + 210, + 84, + 203, + 210, + 112, + 40, + 188, + 35, + 131, + 34, + 122, + 236, + 115, + 28, + 227, + 17, + 217, + 152, + 155, + 175, + 166, + 254, + 34, + 94, + 37, + 168, + 230, + 18, + 3, + 76, + 82, + 26, + 36, + 96, + 218, + 54, + 162, + 198, + 230, + 193, + 61, + 139, + 123, + 208, + 78, + 76, + 40, + 22, + 48, + 14, + 146, + 30, + 81, + 171, + 97, + 66, + 135, + 55, + 139, + 67, + 5, + 14, + 14, + 47, + 165, + 107, + 22, + 118, + 65, + 136, + 122, + 242, + 102, + 28, + 183, + 244, + 135, + 182, + 147, + 0, + 127, + 148, + 225, + 112, + 254, + 164, + 185, + 139, + 100, + 86, + 239, + 151, + 242, + 236, + 221, + 77, + 56, + 173, + 149, + 50, + 124, + 113, + 219, + 183, + 241, + 233, + 114, + 75, + 23, + 110, + 60, + 128, + 218, + 169, + 102, + 141, + 46, + 199, + 208, + 128, + 129, + 88, + 255, + 243, + 64, + 196, + 24, + 27, + 34, + 22, + 210, + 82, + 97, + 134, + 228, + 66, + 22, + 50, + 249, + 151, + 247, + 215, + 3, + 134, + 74, + 175, + 116, + 241, + 187, + 17, + 174, + 147, + 99, + 43, + 118, + 54, + 96, + 225, + 226, + 67, + 121, + 191, + 177, + 92, + 250, + 95, + 237, + 171, + 53, + 42, + 130, + 198, + 172, + 117, + 175, + 59, + 249, + 167, + 174, + 165, + 97, + 73, + 79, + 200, + 137, + 243, + 48, + 96, + 133, + 152, + 19, + 80, + 176, + 177, + 228, + 201, + 208, + 205, + 2, + 210, + 192, + 88, + 0, + 155, + 29, + 42, + 134, + 104, + 211, + 176, + 233, + 106, + 212, + 255, + 69, + 55, + 237, + 115, + 210, + 181, + 248, + 248, + 156, + 109, + 252, + 128, + 255, + 243, + 80, + 196, + 6, + 27, + 57, + 122, + 198, + 84, + 123, + 6, + 20, + 176, + 105, + 34, + 160, + 50, + 134, + 120, + 203, + 170, + 201, + 247, + 177, + 73, + 199, + 23, + 213, + 8, + 49, + 114, + 11, + 24, + 145, + 47, + 48, + 102, + 66, + 208, + 26, + 58, + 24, + 8, + 136, + 23, + 254, + 123, + 33, + 129, + 92, + 82, + 166 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 9, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-10/input.png b/tests/end-to-end/structured-append-10/input.png new file mode 100644 index 00000000..fba5b41d Binary files /dev/null and b/tests/end-to-end/structured-append-10/input.png differ diff --git a/tests/end-to-end/structured-append-10/output.json b/tests/end-to-end/structured-append-10/output.json new file mode 100644 index 00000000..2baf7d53 --- /dev/null +++ b/tests/end-to-end/structured-append-10/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 102, + 71, + 3, + 174, + 172, + 202, + 37, + 13, + 70, + 28, + 167, + 98, + 115, + 109, + 78, + 202, + 36, + 200, + 84, + 8, + 34, + 90, + 14, + 145, + 148, + 72, + 50, + 160, + 170, + 213, + 34, + 211, + 185, + 91, + 74, + 201, + 217, + 189, + 201, + 214, + 38, + 27, + 81, + 82, + 50, + 203, + 49, + 101, + 72, + 67, + 187, + 84, + 19, + 236, + 246, + 208, + 177, + 129, + 224, + 186, + 72, + 148, + 54, + 113, + 216, + 97, + 192, + 206, + 234, + 69, + 152, + 223, + 26, + 6, + 120, + 177, + 151, + 255, + 243, + 80, + 196, + 14, + 26, + 145, + 218, + 210, + 116, + 123, + 4, + 120, + 197, + 1, + 116, + 45, + 131, + 206, + 3, + 11, + 75, + 28, + 98, + 43, + 139, + 72, + 107, + 128, + 153, + 146, + 196, + 72, + 75, + 38, + 118, + 250, + 189, + 124, + 252, + 252, + 230, + 222, + 203, + 12, + 4, + 113, + 28, + 204, + 92, + 141, + 239, + 8, + 32, + 0, + 65, + 201, + 191, + 218, + 68, + 33, + 4, + 17, + 180, + 207, + 115, + 183, + 68, + 68, + 215, + 162, + 52, + 53, + 58, + 16, + 163, + 142, + 201, + 197, + 53, + 173, + 168, + 114, + 124, + 131, + 149, + 7, + 193, + 243, + 230, + 211, + 241, + 225, + 113, + 112, + 246, + 141, + 76, + 86, + 207, + 127, + 246, + 203, + 219, + 115, + 170, + 144, + 56, + 149, + 185, + 235, + 48, + 53, + 35, + 134, + 99, + 9, + 177, + 236, + 240, + 26, + 181, + 154, + 238, + 201, + 67, + 132, + 229, + 186, + 237, + 255, + 243, + 80, + 196, + 24, + 33, + 33, + 122, + 210, + 84, + 195, + 7, + 36, + 202, + 102, + 3, + 127, + 149, + 94, + 16, + 232, + 57, + 77, + 74, + 88, + 156, + 112, + 204, + 142, + 154, + 114, + 110, + 125, + 45, + 217, + 130, + 19, + 203, + 128, + 93, + 55, + 241, + 199, + 143, + 88, + 137, + 58, + 190, + 224, + 228, + 140, + 84, + 194, + 139, + 166, + 62, + 153, + 113, + 230, + 84, + 186, + 144, + 30, + 160, + 34, + 118, + 203, + 47, + 150, + 133, + 19, + 147, + 242, + 223, + 140, + 206, + 153, + 224, + 132, + 98, + 245, + 173, + 196, + 138, + 137, + 92, + 29, + 138, + 2, + 100, + 75, + 42, + 201, + 209, + 112, + 8, + 164, + 1, + 209, + 165, + 122, + 194, + 106, + 61, + 109, + 204, + 130, + 164, + 214, + 53, + 214, + 239, + 220, + 46, + 159, + 109, + 20, + 247, + 200, + 218, + 86, + 234, + 12, + 108, + 233, + 39, + 63, + 14, + 147, + 169, + 255, + 243, + 96, + 196, + 8, + 31, + 83, + 66, + 192, + 242, + 194, + 74, + 180, + 99, + 91, + 157, + 127, + 106, + 102, + 232, + 179, + 23, + 62, + 61, + 166, + 198, + 179, + 31, + 138, + 125, + 34, + 246, + 66, + 14, + 155, + 174, + 168, + 16, + 73, + 162, + 150, + 72, + 155, + 87, + 25, + 81, + 186, + 148, + 255, + 67, + 155, + 40, + 229, + 39, + 12, + 116, + 244, + 197, + 28, + 81, + 43, + 165, + 143, + 34, + 131, + 232, + 102, + 16, + 159, + 102, + 186, + 78, + 168, + 135, + 116, + 100, + 34, + 167, + 85, + 204, + 200, + 48, + 135, + 153, + 182, + 49, + 79, + 159, + 102, + 223, + 144, + 172, + 85, + 90, + 144, + 115, + 162, + 38, + 151, + 182, + 134, + 211, + 183, + 158, + 246, + 86, + 77, + 149, + 100, + 250, + 47, + 94, + 207, + 149, + 7, + 11, + 53, + 229, + 82, + 97, + 174, + 126, + 138, + 198, + 42, + 23, + 40, + 229, + 84, + 218, + 234, + 13, + 167, + 76, + 165, + 36, + 181, + 127, + 174, + 214, + 139, + 74, + 153, + 210, + 142, + 180, + 40, + 10, + 71, + 41, + 70, + 8, + 92, + 152, + 179, + 206, + 255, + 243, + 80, + 196, + 25, + 32, + 171, + 218, + 180, + 2, + 202, + 70, + 173, + 46, + 52, + 54, + 250, + 216, + 4, + 81, + 24, + 38, + 146, + 38, + 210, + 247, + 35, + 244, + 193, + 143, + 8, + 83, + 57, + 212, + 20, + 241, + 205, + 106, + 141, + 149, + 148, + 181, + 153, + 161, + 109, + 32, + 10, + 230, + 90, + 222, + 243, + 92, + 65, + 17, + 130, + 93, + 161, + 95, + 164, + 190, + 28, + 155, + 42, + 99, + 168, + 201, + 166, + 94, + 87, + 117, + 251, + 77, + 127, + 48, + 64, + 134, + 100, + 75, + 193, + 171, + 101, + 194, + 223, + 255, + 220, + 170, + 207, + 219, + 40, + 185, + 126 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 10, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 102, + 71, + 3, + 174, + 172, + 202, + 37, + 13, + 70, + 28, + 167, + 98, + 115, + 109, + 78, + 202, + 36, + 200, + 84, + 8, + 34, + 90, + 14, + 145, + 148, + 72, + 50, + 160, + 170, + 213, + 34, + 211, + 185, + 91, + 74, + 201, + 217, + 189, + 201, + 214, + 38, + 27, + 81, + 82, + 50, + 203, + 49, + 101, + 72, + 67, + 187, + 84, + 19, + 236, + 246, + 208, + 177, + 129, + 224, + 186, + 72, + 148, + 54, + 113, + 216, + 97, + 192, + 206, + 234, + 69, + 152, + 223, + 26, + 6, + 120, + 177, + 151, + 255, + 243, + 80, + 196, + 14, + 26, + 145, + 218, + 210, + 116, + 123, + 4, + 120, + 197, + 1, + 116, + 45, + 131, + 206, + 3, + 11, + 75, + 28, + 98, + 43, + 139, + 72, + 107, + 128, + 153, + 146, + 196, + 72, + 75, + 38, + 118, + 250, + 189, + 124, + 252, + 252, + 230, + 222, + 203, + 12, + 4, + 113, + 28, + 204, + 92, + 141, + 239, + 8, + 32, + 0, + 65, + 201, + 191, + 218, + 68, + 33, + 4, + 17, + 180, + 207, + 115, + 183, + 68, + 68, + 215, + 162, + 52, + 53, + 58, + 16, + 163, + 142, + 201, + 197, + 53, + 173, + 168, + 114, + 124, + 131, + 149, + 7, + 193, + 243, + 230, + 211, + 241, + 225, + 113, + 112, + 246, + 141, + 76, + 86, + 207, + 127, + 246, + 203, + 219, + 115, + 170, + 144, + 56, + 149, + 185, + 235, + 48, + 53, + 35, + 134, + 99, + 9, + 177, + 236, + 240, + 26, + 181, + 154, + 238, + 201, + 67, + 132, + 229, + 186, + 237, + 255, + 243, + 80, + 196, + 24, + 33, + 33, + 122, + 210, + 84, + 195, + 7, + 36, + 202, + 102, + 3, + 127, + 149, + 94, + 16, + 232, + 57, + 77, + 74, + 88, + 156, + 112, + 204, + 142, + 154, + 114, + 110, + 125, + 45, + 217, + 130, + 19, + 203, + 128, + 93, + 55, + 241, + 199, + 143, + 88, + 137, + 58, + 190, + 224, + 228, + 140, + 84, + 194, + 139, + 166, + 62, + 153, + 113, + 230, + 84, + 186, + 144, + 30, + 160, + 34, + 118, + 203, + 47, + 150, + 133, + 19, + 147, + 242, + 223, + 140, + 206, + 153, + 224, + 132, + 98, + 245, + 173, + 196, + 138, + 137, + 92, + 29, + 138, + 2, + 100, + 75, + 42, + 201, + 209, + 112, + 8, + 164, + 1, + 209, + 165, + 122, + 194, + 106, + 61, + 109, + 204, + 130, + 164, + 214, + 53, + 214, + 239, + 220, + 46, + 159, + 109, + 20, + 247, + 200, + 218, + 86, + 234, + 12, + 108, + 233, + 39, + 63, + 14, + 147, + 169, + 255, + 243, + 96, + 196, + 8, + 31, + 83, + 66, + 192, + 242, + 194, + 74, + 180, + 99, + 91, + 157, + 127, + 106, + 102, + 232, + 179, + 23, + 62, + 61, + 166, + 198, + 179, + 31, + 138, + 125, + 34, + 246, + 66, + 14, + 155, + 174, + 168, + 16, + 73, + 162, + 150, + 72, + 155, + 87, + 25, + 81, + 186, + 148, + 255, + 67, + 155, + 40, + 229, + 39, + 12, + 116, + 244, + 197, + 28, + 81, + 43, + 165, + 143, + 34, + 131, + 232, + 102, + 16, + 159, + 102, + 186, + 78, + 168, + 135, + 116, + 100, + 34, + 167, + 85, + 204, + 200, + 48, + 135, + 153, + 182, + 49, + 79, + 159, + 102, + 223, + 144, + 172, + 85, + 90, + 144, + 115, + 162, + 38, + 151, + 182, + 134, + 211, + 183, + 158, + 246, + 86, + 77, + 149, + 100, + 250, + 47, + 94, + 207, + 149, + 7, + 11, + 53, + 229, + 82, + 97, + 174, + 126, + 138, + 198, + 42, + 23, + 40, + 229, + 84, + 218, + 234, + 13, + 167, + 76, + 165, + 36, + 181, + 127, + 174, + 214, + 139, + 74, + 153, + 210, + 142, + 180, + 40, + 10, + 71, + 41, + 70, + 8, + 92, + 152, + 179, + 206, + 255, + 243, + 80, + 196, + 25, + 32, + 171, + 218, + 180, + 2, + 202, + 70, + 173, + 46, + 52, + 54, + 250, + 216, + 4, + 81, + 24, + 38, + 146, + 38, + 210, + 247, + 35, + 244, + 193, + 143, + 8, + 83, + 57, + 212, + 20, + 241, + 205, + 106, + 141, + 149, + 148, + 181, + 153, + 161, + 109, + 32, + 10, + 230, + 90, + 222, + 243, + 92, + 65, + 17, + 130, + 93, + 161, + 95, + 164, + 190, + 28, + 155, + 42, + 99, + 168, + 201, + 166, + 94, + 87, + 117, + 251, + 77, + 127, + 48, + 64, + 134, + 100, + 75, + 193, + 171, + 101, + 194, + 223, + 255, + 220, + 170, + 207, + 219, + 40, + 185, + 126 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 10, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-11/input.png b/tests/end-to-end/structured-append-11/input.png new file mode 100644 index 00000000..32fb83f9 Binary files /dev/null and b/tests/end-to-end/structured-append-11/input.png differ diff --git a/tests/end-to-end/structured-append-11/output.json b/tests/end-to-end/structured-append-11/output.json new file mode 100644 index 00000000..f6bb9e3b --- /dev/null +++ b/tests/end-to-end/structured-append-11/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 100, + 137, + 146, + 222, + 101, + 229, + 149, + 209, + 217, + 179, + 46, + 161, + 126, + 112, + 233, + 95, + 44, + 254, + 159, + 195, + 35, + 207, + 32, + 215, + 76, + 223, + 110, + 237, + 0, + 132, + 17, + 91, + 149, + 41, + 217, + 53, + 153, + 243, + 128, + 255, + 243, + 96, + 196, + 11, + 32, + 251, + 218, + 193, + 108, + 194, + 70, + 177, + 166, + 8, + 56, + 186, + 42, + 175, + 71, + 118, + 93, + 49, + 11, + 110, + 13, + 69, + 245, + 167, + 92, + 7, + 2, + 205, + 170, + 202, + 8, + 106, + 88, + 118, + 214, + 32, + 12, + 66, + 229, + 44, + 168, + 65, + 119, + 144, + 1, + 183, + 168, + 34, + 158, + 91, + 196, + 64, + 0, + 138, + 28, + 233, + 205, + 207, + 154, + 37, + 7, + 17, + 145, + 15, + 77, + 221, + 205, + 62, + 210, + 45, + 139, + 176, + 146, + 250, + 164, + 138, + 127, + 115, + 216, + 118, + 46, + 198, + 239, + 116, + 115, + 253, + 126, + 241, + 148, + 243, + 58, + 102, + 220, + 203, + 62, + 111, + 19, + 235, + 95, + 242, + 207, + 137, + 219, + 123, + 195, + 255, + 124, + 167, + 157, + 254, + 204, + 191, + 63, + 249, + 169, + 243, + 133, + 218, + 95, + 151, + 151, + 91, + 86, + 166, + 4, + 195, + 189, + 213, + 204, + 3, + 169, + 1, + 33, + 157, + 160, + 77, + 0, + 29, + 15, + 72, + 21, + 128, + 113, + 5, + 40, + 90, + 69, + 189, + 67, + 84, + 163, + 255, + 243, + 80, + 196, + 22, + 32, + 89, + 186, + 196, + 84, + 122, + 71, + 68, + 158, + 21, + 98, + 106, + 83, + 11, + 57, + 41, + 48, + 156, + 77, + 186, + 204, + 247, + 56, + 217, + 158, + 127, + 53, + 140, + 240, + 140, + 22, + 212, + 227, + 232, + 76, + 105, + 201, + 215, + 209, + 132, + 216, + 119, + 15, + 80, + 143, + 43, + 129, + 81, + 100, + 77, + 48, + 125, + 34, + 103, + 153, + 0, + 106, + 129, + 145, + 96, + 178, + 103, + 20, + 66, + 154, + 205, + 192, + 22, + 81, + 32, + 133, + 56, + 137, + 159, + 86, + 236, + 196, + 197, + 36, + 45, + 120, + 83, + 176, + 242, + 9, + 165, + 49, + 9, + 128, + 8, + 104, + 51, + 143, + 109, + 2, + 153, + 6, + 143, + 142, + 186, + 89, + 3, + 246, + 51, + 255, + 193, + 22, + 160, + 4, + 231, + 64, + 195, + 227, + 151, + 185, + 21, + 0, + 145, + 106, + 59, + 37, + 182, + 236, + 7, + 8, + 255, + 243, + 80, + 196, + 9, + 27, + 202, + 102, + 225, + 158, + 97, + 134, + 176, + 36, + 71, + 75, + 231, + 6, + 73, + 108, + 186, + 43, + 121, + 217, + 226, + 13, + 165, + 145, + 114, + 218, + 255, + 105, + 130, + 160, + 241, + 43, + 157, + 255, + 248, + 191, + 75, + 52, + 193, + 196, + 30, + 103, + 10, + 71, + 10, + 107, + 15, + 191, + 115, + 85, + 0, + 29, + 26, + 165, + 202, + 108, + 89, + 75, + 216, + 95, + 158, + 79, + 246, + 86, + 217, + 126, + 195, + 147, + 99, + 49, + 57, + 57, + 100, + 126, + 13, + 189, + 77, + 18, + 254, + 113, + 117, + 251, + 131, + 123, + 141, + 170, + 21, + 60, + 4, + 72, + 170, + 74, + 44, + 67, + 41, + 210, + 205, + 20, + 221, + 90, + 206, + 47, + 90, + 104, + 137, + 85, + 75, + 26, + 18, + 178, + 229, + 42, + 84, + 0, + 51, + 220, + 5, + 16, + 140, + 42, + 188, + 125, + 140, + 240, + 119, + 31, + 255, + 243, + 80, + 196, + 14, + 27, + 74, + 6, + 212, + 52, + 97, + 134, + 116, + 223, + 40, + 196, + 81, + 83, + 151, + 164, + 201, + 221, + 46, + 247, + 110, + 80, + 72, + 24, + 226, + 8, + 243, + 215, + 21, + 244, + 9, + 210, + 62, + 135, + 96, + 7, + 115, + 206, + 0, + 37, + 76, + 255, + 255, + 244, + 132, + 230, + 16, + 12, + 92, + 0, + 39, + 211, + 147, + 63, + 66, + 254, + 37, + 124, + 136, + 186, + 238, + 95, + 239, + 196, + 249, + 196, + 16, + 3, + 63, + 245, + 227, + 140, + 4, + 74, + 2, + 14, + 88, + 234, + 205, + 131, + 225, + 252, + 225, + 67, + 131, + 156, + 125, + 151, + 185, + 209, + 192, + 129, + 174, + 143, + 214, + 15, + 164, + 160, + 69, + 19, + 26, + 39, + 10, + 77, + 213, + 23, + 131, + 207, + 119, + 24, + 81, + 44, + 218, + 76, + 7, + 251, + 153, + 252, + 158, + 67, + 153, + 219, + 164, + 219, + 115 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 11, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 100, + 137, + 146, + 222, + 101, + 229, + 149, + 209, + 217, + 179, + 46, + 161, + 126, + 112, + 233, + 95, + 44, + 254, + 159, + 195, + 35, + 207, + 32, + 215, + 76, + 223, + 110, + 237, + 0, + 132, + 17, + 91, + 149, + 41, + 217, + 53, + 153, + 243, + 128, + 255, + 243, + 96, + 196, + 11, + 32, + 251, + 218, + 193, + 108, + 194, + 70, + 177, + 166, + 8, + 56, + 186, + 42, + 175, + 71, + 118, + 93, + 49, + 11, + 110, + 13, + 69, + 245, + 167, + 92, + 7, + 2, + 205, + 170, + 202, + 8, + 106, + 88, + 118, + 214, + 32, + 12, + 66, + 229, + 44, + 168, + 65, + 119, + 144, + 1, + 183, + 168, + 34, + 158, + 91, + 196, + 64, + 0, + 138, + 28, + 233, + 205, + 207, + 154, + 37, + 7, + 17, + 145, + 15, + 77, + 221, + 205, + 62, + 210, + 45, + 139, + 176, + 146, + 250, + 164, + 138, + 127, + 115, + 216, + 118, + 46, + 198, + 239, + 116, + 115, + 253, + 126, + 241, + 148, + 243, + 58, + 102, + 220, + 203, + 62, + 111, + 19, + 235, + 95, + 242, + 207, + 137, + 219, + 123, + 195, + 255, + 124, + 167, + 157, + 254, + 204, + 191, + 63, + 249, + 169, + 243, + 133, + 218, + 95, + 151, + 151, + 91, + 86, + 166, + 4, + 195, + 189, + 213, + 204, + 3, + 169, + 1, + 33, + 157, + 160, + 77, + 0, + 29, + 15, + 72, + 21, + 128, + 113, + 5, + 40, + 90, + 69, + 189, + 67, + 84, + 163, + 255, + 243, + 80, + 196, + 22, + 32, + 89, + 186, + 196, + 84, + 122, + 71, + 68, + 158, + 21, + 98, + 106, + 83, + 11, + 57, + 41, + 48, + 156, + 77, + 186, + 204, + 247, + 56, + 217, + 158, + 127, + 53, + 140, + 240, + 140, + 22, + 212, + 227, + 232, + 76, + 105, + 201, + 215, + 209, + 132, + 216, + 119, + 15, + 80, + 143, + 43, + 129, + 81, + 100, + 77, + 48, + 125, + 34, + 103, + 153, + 0, + 106, + 129, + 145, + 96, + 178, + 103, + 20, + 66, + 154, + 205, + 192, + 22, + 81, + 32, + 133, + 56, + 137, + 159, + 86, + 236, + 196, + 197, + 36, + 45, + 120, + 83, + 176, + 242, + 9, + 165, + 49, + 9, + 128, + 8, + 104, + 51, + 143, + 109, + 2, + 153, + 6, + 143, + 142, + 186, + 89, + 3, + 246, + 51, + 255, + 193, + 22, + 160, + 4, + 231, + 64, + 195, + 227, + 151, + 185, + 21, + 0, + 145, + 106, + 59, + 37, + 182, + 236, + 7, + 8, + 255, + 243, + 80, + 196, + 9, + 27, + 202, + 102, + 225, + 158, + 97, + 134, + 176, + 36, + 71, + 75, + 231, + 6, + 73, + 108, + 186, + 43, + 121, + 217, + 226, + 13, + 165, + 145, + 114, + 218, + 255, + 105, + 130, + 160, + 241, + 43, + 157, + 255, + 248, + 191, + 75, + 52, + 193, + 196, + 30, + 103, + 10, + 71, + 10, + 107, + 15, + 191, + 115, + 85, + 0, + 29, + 26, + 165, + 202, + 108, + 89, + 75, + 216, + 95, + 158, + 79, + 246, + 86, + 217, + 126, + 195, + 147, + 99, + 49, + 57, + 57, + 100, + 126, + 13, + 189, + 77, + 18, + 254, + 113, + 117, + 251, + 131, + 123, + 141, + 170, + 21, + 60, + 4, + 72, + 170, + 74, + 44, + 67, + 41, + 210, + 205, + 20, + 221, + 90, + 206, + 47, + 90, + 104, + 137, + 85, + 75, + 26, + 18, + 178, + 229, + 42, + 84, + 0, + 51, + 220, + 5, + 16, + 140, + 42, + 188, + 125, + 140, + 240, + 119, + 31, + 255, + 243, + 80, + 196, + 14, + 27, + 74, + 6, + 212, + 52, + 97, + 134, + 116, + 223, + 40, + 196, + 81, + 83, + 151, + 164, + 201, + 221, + 46, + 247, + 110, + 80, + 72, + 24, + 226, + 8, + 243, + 215, + 21, + 244, + 9, + 210, + 62, + 135, + 96, + 7, + 115, + 206, + 0, + 37, + 76, + 255, + 255, + 244, + 132, + 230, + 16, + 12, + 92, + 0, + 39, + 211, + 147, + 63, + 66, + 254, + 37, + 124, + 136, + 186, + 238, + 95, + 239, + 196, + 249, + 196, + 16, + 3, + 63, + 245, + 227, + 140, + 4, + 74, + 2, + 14, + 88, + 234, + 205, + 131, + 225, + 252, + 225, + 67, + 131, + 156, + 125, + 151, + 185, + 209, + 192, + 129, + 174, + 143, + 214, + 15, + 164, + 160, + 69, + 19, + 26, + 39, + 10, + 77, + 213, + 23, + 131, + 207, + 119, + 24, + 81, + 44, + 218, + 76, + 7, + 251, + 153, + 252, + 158, + 67, + 153, + 219, + 164, + 219, + 115 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 11, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-12/input.png b/tests/end-to-end/structured-append-12/input.png new file mode 100644 index 00000000..56abd41e Binary files /dev/null and b/tests/end-to-end/structured-append-12/input.png differ diff --git a/tests/end-to-end/structured-append-12/output.json b/tests/end-to-end/structured-append-12/output.json new file mode 100644 index 00000000..c96a4cf9 --- /dev/null +++ b/tests/end-to-end/structured-append-12/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 212, + 255, + 243, + 96, + 196, + 21, + 35, + 210, + 226, + 212, + 42, + 123, + 16, + 188, + 248, + 175, + 75, + 178, + 203, + 251, + 30, + 227, + 199, + 73, + 98, + 173, + 69, + 69, + 86, + 159, + 164, + 254, + 51, + 122, + 70, + 212, + 30, + 200, + 158, + 86, + 165, + 15, + 206, + 140, + 223, + 8, + 16, + 55, + 91, + 118, + 113, + 198, + 175, + 189, + 50, + 118, + 58, + 15, + 199, + 203, + 158, + 45, + 72, + 26, + 44, + 123, + 77, + 213, + 194, + 17, + 74, + 202, + 225, + 129, + 83, + 70, + 52, + 244, + 99, + 220, + 43, + 253, + 213, + 76, + 240, + 165, + 143, + 40, + 145, + 85, + 118, + 183, + 219, + 225, + 90, + 190, + 95, + 157, + 164, + 154, + 237, + 106, + 47, + 127, + 190, + 61, + 89, + 231, + 88, + 109, + 38, + 243, + 248, + 5, + 85, + 103, + 70, + 53, + 92, + 82, + 180, + 213, + 112, + 160, + 241, + 82, + 107, + 105, + 241, + 97, + 117, + 44, + 78, + 64, + 179, + 69, + 213, + 36, + 66, + 9, + 12, + 6, + 102, + 1, + 164, + 149, + 86, + 196, + 129, + 168, + 12, + 208, + 210, + 104, + 74, + 176, + 135, + 255, + 243, + 80, + 196, + 20, + 27, + 209, + 66, + 218, + 42, + 74, + 70, + 13, + 163, + 48, + 96, + 234, + 129, + 65, + 154, + 149, + 32, + 189, + 195, + 236, + 134, + 69, + 176, + 94, + 231, + 67, + 184, + 196, + 96, + 64, + 152, + 19, + 87, + 26, + 252, + 151, + 155, + 97, + 67, + 84, + 86, + 139, + 90, + 33, + 171, + 211, + 124, + 22, + 90, + 116, + 194, + 116, + 167, + 252, + 187, + 69, + 143, + 241, + 231, + 176, + 25, + 187, + 165, + 166, + 201, + 45, + 109, + 112, + 71, + 245, + 208, + 180, + 17, + 127, + 126, + 183, + 123, + 105, + 117, + 169, + 249, + 62, + 253, + 169, + 247, + 177, + 198, + 127, + 205, + 241, + 190, + 139, + 65, + 147, + 221, + 93, + 223, + 254, + 207, + 85, + 40, + 55, + 113, + 73, + 210, + 172, + 181, + 14, + 37, + 186, + 70, + 138, + 70, + 86, + 16, + 137, + 69, + 154, + 88, + 140, + 149, + 164, + 196, + 27, + 234, + 255, + 243, + 64, + 196, + 25, + 26, + 210, + 94, + 218, + 84, + 50, + 70, + 120, + 174, + 107, + 187, + 213, + 229, + 94, + 248, + 174, + 185, + 230, + 227, + 158, + 178, + 17, + 202, + 249, + 181, + 70, + 116, + 14, + 139, + 62, + 25, + 30, + 121, + 30, + 11, + 150, + 75, + 21, + 56, + 89, + 229, + 223, + 36, + 98, + 121, + 100, + 150, + 251, + 150, + 124, + 104, + 189, + 229, + 36, + 185, + 31, + 47, + 255, + 74, + 182, + 69, + 96, + 162, + 104, + 6, + 22, + 46, + 241, + 162, + 233, + 14, + 237, + 123, + 28, + 199, + 179, + 53, + 206, + 152, + 83, + 105, + 114, + 95, + 127, + 200, + 26, + 138, + 21, + 226, + 154, + 213, + 129, + 18, + 171, + 70, + 76, + 2, + 176, + 123, + 255, + 243, + 80, + 196, + 8, + 27, + 131, + 66, + 206, + 84, + 88, + 69, + 176, + 20, + 72, + 57, + 105, + 129, + 52, + 224, + 225, + 146, + 112, + 169, + 45, + 206, + 98, + 6, + 212, + 196, + 152, + 151, + 177, + 117, + 175, + 152, + 183, + 86, + 245, + 216, + 141, + 76, + 61, + 121, + 143, + 148, + 30, + 227, + 220, + 108, + 245, + 42, + 122, + 187, + 139, + 63, + 113, + 18, + 121, + 168, + 211, + 54, + 182, + 72, + 230, + 196, + 76, + 252, + 6, + 194, + 102, + 13, + 199, + 115, + 101, + 1, + 152, + 168, + 96, + 19, + 137, + 225, + 86, + 94, + 16, + 129, + 37, + 96, + 33, + 145, + 77, + 109, + 28, + 181, + 42, + 63, + 140, + 200, + 155, + 210, + 238, + 236, + 191, + 172, + 27, + 244, + 253, + 118, + 165, + 172, + 239, + 138, + 192, + 42, + 21, + 128, + 54, + 190, + 175, + 43, + 64, + 177, + 0, + 21, + 81, + 44, + 200, + 46, + 58, + 161, + 255, + 243, + 80, + 196, + 15, + 26, + 226, + 98, + 202, + 44, + 73, + 134, + 124, + 50, + 16, + 25, + 177, + 232, + 144, + 245, + 117, + 162, + 214, + 149, + 37, + 41, + 253, + 202, + 139, + 156, + 60, + 193, + 67, + 254, + 59, + 247, + 253, + 184, + 23, + 16, + 183, + 247, + 120, + 40, + 195, + 121, + 164, + 233, + 241, + 198, + 160, + 87, + 125, + 56, + 249, + 113, + 99, + 93, + 139, + 66, + 164, + 72, + 96 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 12, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 212, + 255, + 243, + 96, + 196, + 21, + 35, + 210, + 226, + 212, + 42, + 123, + 16, + 188, + 248, + 175, + 75, + 178, + 203, + 251, + 30, + 227, + 199, + 73, + 98, + 173, + 69, + 69, + 86, + 159, + 164, + 254, + 51, + 122, + 70, + 212, + 30, + 200, + 158, + 86, + 165, + 15, + 206, + 140, + 223, + 8, + 16, + 55, + 91, + 118, + 113, + 198, + 175, + 189, + 50, + 118, + 58, + 15, + 199, + 203, + 158, + 45, + 72, + 26, + 44, + 123, + 77, + 213, + 194, + 17, + 74, + 202, + 225, + 129, + 83, + 70, + 52, + 244, + 99, + 220, + 43, + 253, + 213, + 76, + 240, + 165, + 143, + 40, + 145, + 85, + 118, + 183, + 219, + 225, + 90, + 190, + 95, + 157, + 164, + 154, + 237, + 106, + 47, + 127, + 190, + 61, + 89, + 231, + 88, + 109, + 38, + 243, + 248, + 5, + 85, + 103, + 70, + 53, + 92, + 82, + 180, + 213, + 112, + 160, + 241, + 82, + 107, + 105, + 241, + 97, + 117, + 44, + 78, + 64, + 179, + 69, + 213, + 36, + 66, + 9, + 12, + 6, + 102, + 1, + 164, + 149, + 86, + 196, + 129, + 168, + 12, + 208, + 210, + 104, + 74, + 176, + 135, + 255, + 243, + 80, + 196, + 20, + 27, + 209, + 66, + 218, + 42, + 74, + 70, + 13, + 163, + 48, + 96, + 234, + 129, + 65, + 154, + 149, + 32, + 189, + 195, + 236, + 134, + 69, + 176, + 94, + 231, + 67, + 184, + 196, + 96, + 64, + 152, + 19, + 87, + 26, + 252, + 151, + 155, + 97, + 67, + 84, + 86, + 139, + 90, + 33, + 171, + 211, + 124, + 22, + 90, + 116, + 194, + 116, + 167, + 252, + 187, + 69, + 143, + 241, + 231, + 176, + 25, + 187, + 165, + 166, + 201, + 45, + 109, + 112, + 71, + 245, + 208, + 180, + 17, + 127, + 126, + 183, + 123, + 105, + 117, + 169, + 249, + 62, + 253, + 169, + 247, + 177, + 198, + 127, + 205, + 241, + 190, + 139, + 65, + 147, + 221, + 93, + 223, + 254, + 207, + 85, + 40, + 55, + 113, + 73, + 210, + 172, + 181, + 14, + 37, + 186, + 70, + 138, + 70, + 86, + 16, + 137, + 69, + 154, + 88, + 140, + 149, + 164, + 196, + 27, + 234, + 255, + 243, + 64, + 196, + 25, + 26, + 210, + 94, + 218, + 84, + 50, + 70, + 120, + 174, + 107, + 187, + 213, + 229, + 94, + 248, + 174, + 185, + 230, + 227, + 158, + 178, + 17, + 202, + 249, + 181, + 70, + 116, + 14, + 139, + 62, + 25, + 30, + 121, + 30, + 11, + 150, + 75, + 21, + 56, + 89, + 229, + 223, + 36, + 98, + 121, + 100, + 150, + 251, + 150, + 124, + 104, + 189, + 229, + 36, + 185, + 31, + 47, + 255, + 74, + 182, + 69, + 96, + 162, + 104, + 6, + 22, + 46, + 241, + 162, + 233, + 14, + 237, + 123, + 28, + 199, + 179, + 53, + 206, + 152, + 83, + 105, + 114, + 95, + 127, + 200, + 26, + 138, + 21, + 226, + 154, + 213, + 129, + 18, + 171, + 70, + 76, + 2, + 176, + 123, + 255, + 243, + 80, + 196, + 8, + 27, + 131, + 66, + 206, + 84, + 88, + 69, + 176, + 20, + 72, + 57, + 105, + 129, + 52, + 224, + 225, + 146, + 112, + 169, + 45, + 206, + 98, + 6, + 212, + 196, + 152, + 151, + 177, + 117, + 175, + 152, + 183, + 86, + 245, + 216, + 141, + 76, + 61, + 121, + 143, + 148, + 30, + 227, + 220, + 108, + 245, + 42, + 122, + 187, + 139, + 63, + 113, + 18, + 121, + 168, + 211, + 54, + 182, + 72, + 230, + 196, + 76, + 252, + 6, + 194, + 102, + 13, + 199, + 115, + 101, + 1, + 152, + 168, + 96, + 19, + 137, + 225, + 86, + 94, + 16, + 129, + 37, + 96, + 33, + 145, + 77, + 109, + 28, + 181, + 42, + 63, + 140, + 200, + 155, + 210, + 238, + 236, + 191, + 172, + 27, + 244, + 253, + 118, + 165, + 172, + 239, + 138, + 192, + 42, + 21, + 128, + 54, + 190, + 175, + 43, + 64, + 177, + 0, + 21, + 81, + 44, + 200, + 46, + 58, + 161, + 255, + 243, + 80, + 196, + 15, + 26, + 226, + 98, + 202, + 44, + 73, + 134, + 124, + 50, + 16, + 25, + 177, + 232, + 144, + 245, + 117, + 162, + 214, + 149, + 37, + 41, + 253, + 202, + 139, + 156, + 60, + 193, + 67, + 254, + 59, + 247, + 253, + 184, + 23, + 16, + 183, + 247, + 120, + 40, + 195, + 121, + 164, + 233, + 241, + 198, + 160, + 87, + 125, + 56, + 249, + 113, + 99, + 93, + 139, + 66, + 164, + 72, + 96 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 12, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-13/input.png b/tests/end-to-end/structured-append-13/input.png new file mode 100644 index 00000000..72bb857a Binary files /dev/null and b/tests/end-to-end/structured-append-13/input.png differ diff --git a/tests/end-to-end/structured-append-13/output.json b/tests/end-to-end/structured-append-13/output.json new file mode 100644 index 00000000..7ae4702b --- /dev/null +++ b/tests/end-to-end/structured-append-13/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 182, + 203, + 51, + 135, + 63, + 34, + 206, + 133, + 40, + 183, + 106, + 95, + 210, + 225, + 247, + 114, + 209, + 176, + 201, + 22, + 151, + 101, + 22, + 175, + 235, + 91, + 133, + 244, + 34, + 162, + 136, + 22, + 167, + 235, + 118, + 56, + 85, + 107, + 34, + 115, + 235, + 48, + 165, + 19, + 251, + 202, + 0, + 49, + 154, + 232, + 165, + 196, + 59, + 133, + 170, + 76, + 64, + 74, + 247, + 22, + 62, + 88, + 21, + 117, + 7, + 177, + 71, + 255, + 243, + 64, + 196, + 24, + 26, + 217, + 250, + 189, + 140, + 97, + 138, + 112, + 136, + 49, + 86, + 158, + 225, + 82, + 232, + 52, + 48, + 97, + 153, + 220, + 195, + 61, + 89, + 194, + 156, + 187, + 92, + 35, + 45, + 16, + 232, + 199, + 238, + 240, + 82, + 57, + 181, + 65, + 107, + 106, + 171, + 163, + 210, + 216, + 246, + 51, + 14, + 44, + 229, + 90, + 42, + 34, + 201, + 198, + 22, + 23, + 5, + 10, + 30, + 48, + 238, + 104, + 186, + 195, + 198, + 56, + 152, + 195, + 214, + 252, + 177, + 135, + 132, + 187, + 175, + 77, + 34, + 247, + 210, + 205, + 122, + 234, + 220, + 109, + 206, + 67, + 144, + 246, + 145, + 34, + 117, + 106, + 168, + 168, + 126, + 102, + 1, + 67, + 233, + 255, + 243, + 80, + 196, + 7, + 28, + 33, + 170, + 190, + 44, + 121, + 134, + 148, + 181, + 45, + 103, + 140, + 44, + 207, + 93, + 71, + 206, + 207, + 247, + 140, + 245, + 2, + 66, + 16, + 56, + 125, + 75, + 164, + 163, + 181, + 15, + 251, + 238, + 103, + 46, + 86, + 48, + 134, + 110, + 221, + 124, + 48, + 108, + 103, + 87, + 100, + 129, + 146, + 243, + 68, + 204, + 230, + 98, + 145, + 188, + 179, + 233, + 253, + 148, + 57, + 249, + 207, + 60, + 76, + 15, + 185, + 68, + 147, + 36, + 15, + 149, + 116, + 80, + 70, + 40, + 231, + 220, + 54, + 19, + 91, + 23, + 50, + 121, + 170, + 141, + 177, + 14, + 139, + 129, + 239, + 151, + 90, + 248, + 68, + 248, + 148, + 44, + 16, + 114, + 27, + 160, + 241, + 71, + 1, + 201, + 68, + 10, + 15, + 212, + 66, + 40, + 83, + 64, + 218, + 229, + 94, + 106, + 128, + 88, + 141, + 8, + 251, + 150, + 34, + 192, + 255, + 243, + 96, + 196, + 11, + 32, + 164, + 22, + 197, + 140, + 73, + 134, + 68, + 185, + 42, + 199, + 165, + 36, + 81, + 245, + 80, + 224, + 72, + 212, + 135, + 221, + 103, + 213, + 59, + 75, + 25, + 14, + 12, + 197, + 36, + 206, + 205, + 27, + 50, + 53, + 85, + 206, + 251, + 224, + 171, + 29, + 54, + 194, + 192, + 108, + 2, + 156, + 114, + 228, + 83, + 255, + 126, + 172, + 170, + 48, + 64, + 232, + 66, + 88, + 214, + 106, + 69, + 13, + 97, + 255, + 45, + 38, + 242, + 51, + 204, + 190, + 145, + 12, + 101, + 105, + 216, + 115, + 80, + 78, + 93, + 243, + 207, + 94, + 176, + 187, + 154, + 21, + 41, + 59, + 54, + 11, + 156, + 53, + 134, + 71, + 51, + 83, + 242, + 201, + 13, + 96, + 165, + 76, + 202, + 145, + 245, + 48, + 194, + 37, + 9, + 250, + 142, + 68, + 202, + 24, + 200, + 163, + 129, + 208, + 85, + 8, + 76, + 249, + 176, + 113, + 35, + 135, + 74, + 104, + 187, + 28, + 69, + 108, + 2, + 2, + 68, + 69, + 112, + 64, + 153, + 209, + 54, + 61, + 53, + 96, + 254, + 173, + 215, + 47, + 6, + 91, + 255, + 243, + 64, + 196, + 23, + 27, + 162, + 238, + 198, + 76, + 96, + 196, + 252, + 50, + 95, + 254, + 241, + 203, + 70, + 107, + 186, + 8, + 33, + 214, + 110, + 45, + 79, + 174, + 152, + 44, + 190, + 25, + 132, + 169, + 228, + 68, + 196, + 125, + 132, + 99, + 229, + 147, + 2, + 162, + 142, + 218, + 177, + 215, + 57, + 194, + 170, + 24, + 116, + 24, + 194, + 174, + 71, + 154, + 165, + 255, + 41, + 145, + 165, + 103, + 232, + 86, + 245, + 77, + 80, + 199, + 7, + 234, + 159, + 222, + 174, + 204, + 103, + 187, + 224, + 108, + 157, + 14, + 40, + 58, + 182, + 44, + 223, + 113, + 141, + 73, + 208, + 246, + 17, + 78, + 194, + 143, + 84, + 233, + 150, + 46, + 138, + 50, + 51, + 45, + 255, + 243, + 80, + 196, + 3, + 27, + 1, + 166, + 198, + 84, + 121, + 132, + 200, + 145, + 74, + 128, + 60, + 22, + 47, + 168, + 204, + 172, + 104 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 13, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 182, + 203, + 51, + 135, + 63, + 34, + 206, + 133, + 40, + 183, + 106, + 95, + 210, + 225, + 247, + 114, + 209, + 176, + 201, + 22, + 151, + 101, + 22, + 175, + 235, + 91, + 133, + 244, + 34, + 162, + 136, + 22, + 167, + 235, + 118, + 56, + 85, + 107, + 34, + 115, + 235, + 48, + 165, + 19, + 251, + 202, + 0, + 49, + 154, + 232, + 165, + 196, + 59, + 133, + 170, + 76, + 64, + 74, + 247, + 22, + 62, + 88, + 21, + 117, + 7, + 177, + 71, + 255, + 243, + 64, + 196, + 24, + 26, + 217, + 250, + 189, + 140, + 97, + 138, + 112, + 136, + 49, + 86, + 158, + 225, + 82, + 232, + 52, + 48, + 97, + 153, + 220, + 195, + 61, + 89, + 194, + 156, + 187, + 92, + 35, + 45, + 16, + 232, + 199, + 238, + 240, + 82, + 57, + 181, + 65, + 107, + 106, + 171, + 163, + 210, + 216, + 246, + 51, + 14, + 44, + 229, + 90, + 42, + 34, + 201, + 198, + 22, + 23, + 5, + 10, + 30, + 48, + 238, + 104, + 186, + 195, + 198, + 56, + 152, + 195, + 214, + 252, + 177, + 135, + 132, + 187, + 175, + 77, + 34, + 247, + 210, + 205, + 122, + 234, + 220, + 109, + 206, + 67, + 144, + 246, + 145, + 34, + 117, + 106, + 168, + 168, + 126, + 102, + 1, + 67, + 233, + 255, + 243, + 80, + 196, + 7, + 28, + 33, + 170, + 190, + 44, + 121, + 134, + 148, + 181, + 45, + 103, + 140, + 44, + 207, + 93, + 71, + 206, + 207, + 247, + 140, + 245, + 2, + 66, + 16, + 56, + 125, + 75, + 164, + 163, + 181, + 15, + 251, + 238, + 103, + 46, + 86, + 48, + 134, + 110, + 221, + 124, + 48, + 108, + 103, + 87, + 100, + 129, + 146, + 243, + 68, + 204, + 230, + 98, + 145, + 188, + 179, + 233, + 253, + 148, + 57, + 249, + 207, + 60, + 76, + 15, + 185, + 68, + 147, + 36, + 15, + 149, + 116, + 80, + 70, + 40, + 231, + 220, + 54, + 19, + 91, + 23, + 50, + 121, + 170, + 141, + 177, + 14, + 139, + 129, + 239, + 151, + 90, + 248, + 68, + 248, + 148, + 44, + 16, + 114, + 27, + 160, + 241, + 71, + 1, + 201, + 68, + 10, + 15, + 212, + 66, + 40, + 83, + 64, + 218, + 229, + 94, + 106, + 128, + 88, + 141, + 8, + 251, + 150, + 34, + 192, + 255, + 243, + 96, + 196, + 11, + 32, + 164, + 22, + 197, + 140, + 73, + 134, + 68, + 185, + 42, + 199, + 165, + 36, + 81, + 245, + 80, + 224, + 72, + 212, + 135, + 221, + 103, + 213, + 59, + 75, + 25, + 14, + 12, + 197, + 36, + 206, + 205, + 27, + 50, + 53, + 85, + 206, + 251, + 224, + 171, + 29, + 54, + 194, + 192, + 108, + 2, + 156, + 114, + 228, + 83, + 255, + 126, + 172, + 170, + 48, + 64, + 232, + 66, + 88, + 214, + 106, + 69, + 13, + 97, + 255, + 45, + 38, + 242, + 51, + 204, + 190, + 145, + 12, + 101, + 105, + 216, + 115, + 80, + 78, + 93, + 243, + 207, + 94, + 176, + 187, + 154, + 21, + 41, + 59, + 54, + 11, + 156, + 53, + 134, + 71, + 51, + 83, + 242, + 201, + 13, + 96, + 165, + 76, + 202, + 145, + 245, + 48, + 194, + 37, + 9, + 250, + 142, + 68, + 202, + 24, + 200, + 163, + 129, + 208, + 85, + 8, + 76, + 249, + 176, + 113, + 35, + 135, + 74, + 104, + 187, + 28, + 69, + 108, + 2, + 2, + 68, + 69, + 112, + 64, + 153, + 209, + 54, + 61, + 53, + 96, + 254, + 173, + 215, + 47, + 6, + 91, + 255, + 243, + 64, + 196, + 23, + 27, + 162, + 238, + 198, + 76, + 96, + 196, + 252, + 50, + 95, + 254, + 241, + 203, + 70, + 107, + 186, + 8, + 33, + 214, + 110, + 45, + 79, + 174, + 152, + 44, + 190, + 25, + 132, + 169, + 228, + 68, + 196, + 125, + 132, + 99, + 229, + 147, + 2, + 162, + 142, + 218, + 177, + 215, + 57, + 194, + 170, + 24, + 116, + 24, + 194, + 174, + 71, + 154, + 165, + 255, + 41, + 145, + 165, + 103, + 232, + 86, + 245, + 77, + 80, + 199, + 7, + 234, + 159, + 222, + 174, + 204, + 103, + 187, + 224, + 108, + 157, + 14, + 40, + 58, + 182, + 44, + 223, + 113, + 141, + 73, + 208, + 246, + 17, + 78, + 194, + 143, + 84, + 233, + 150, + 46, + 138, + 50, + 51, + 45, + 255, + 243, + 80, + 196, + 3, + 27, + 1, + 166, + 198, + 84, + 121, + 132, + 200, + 145, + 74, + 128, + 60, + 22, + 47, + 168, + 204, + 172, + 104 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 13, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-14/input.png b/tests/end-to-end/structured-append-14/input.png new file mode 100644 index 00000000..65efdd84 Binary files /dev/null and b/tests/end-to-end/structured-append-14/input.png differ diff --git a/tests/end-to-end/structured-append-14/output.json b/tests/end-to-end/structured-append-14/output.json new file mode 100644 index 00000000..087c7965 --- /dev/null +++ b/tests/end-to-end/structured-append-14/output.json @@ -0,0 +1,1226 @@ +{ + "binaryData": [ + 65, + 77, + 6, + 6, + 111, + 63, + 221, + 98, + 155, + 205, + 17, + 144, + 220, + 71, + 68, + 164, + 88, + 219, + 185, + 100, + 154, + 40, + 178, + 173, + 24, + 253, + 15, + 52, + 206, + 56, + 97, + 157, + 247, + 134, + 180, + 179, + 180, + 185, + 70, + 69, + 16, + 136, + 182, + 168, + 218, + 97, + 14, + 90, + 46, + 115, + 224, + 229, + 152, + 10, + 187, + 83, + 97, + 202, + 205, + 210, + 121, + 242, + 141, + 221, + 1, + 63, + 101, + 66, + 239, + 72, + 194, + 149, + 173, + 76, + 89, + 171, + 185, + 209, + 243, + 117, + 33, + 218, + 136, + 155, + 210, + 116, + 154, + 210, + 230, + 10, + 173, + 226, + 204, + 12, + 16, + 180, + 8, + 97, + 128, + 192, + 10, + 5, + 181, + 32, + 176, + 82, + 36, + 255, + 243, + 80, + 196, + 12, + 27, + 177, + 186, + 198, + 76, + 123, + 6, + 28, + 170, + 20, + 3, + 65, + 44, + 75, + 126, + 165, + 179, + 59, + 182, + 250, + 151, + 33, + 223, + 156, + 206, + 172, + 6, + 22, + 96, + 241, + 11, + 180, + 12, + 112, + 130, + 25, + 55, + 253, + 36, + 3, + 22, + 38, + 157, + 244, + 161, + 196, + 127, + 201, + 87, + 247, + 119, + 52, + 71, + 174, + 250, + 17, + 124, + 111, + 255, + 222, + 226, + 4, + 36, + 131, + 105, + 2, + 41, + 195, + 147, + 65, + 248, + 129, + 30, + 34, + 11, + 48, + 64, + 34, + 84, + 153, + 250, + 5, + 172, + 59, + 68, + 16, + 36, + 151, + 251, + 83, + 94, + 25, + 88, + 173, + 41, + 106, + 212, + 227, + 207, + 88, + 172, + 218, + 28, + 59, + 214, + 32, + 170, + 161, + 207, + 45, + 146, + 84, + 137, + 90, + 117, + 38, + 213, + 247, + 9, + 68, + 10, + 100, + 91, + 59, + 129, + 255, + 243, + 80, + 196, + 18, + 32, + 225, + 162, + 214, + 84, + 123, + 16, + 152, + 126, + 31, + 226, + 132, + 174, + 92, + 140, + 168, + 16, + 88, + 171, + 22, + 253, + 215, + 158, + 197, + 86, + 250, + 206, + 165, + 118, + 60, + 100, + 154, + 7, + 144, + 161, + 139, + 232, + 215, + 59, + 61, + 61, + 13, + 204, + 84, + 119, + 35, + 138, + 146, + 20, + 21, + 54, + 161, + 215, + 170, + 226, + 85, + 76, + 1, + 38, + 184, + 26, + 214, + 33, + 95, + 233, + 212, + 39, + 247, + 51, + 7, + 88, + 84, + 232, + 6, + 30, + 197, + 140, + 139, + 8, + 195, + 166, + 129, + 149, + 165, + 13, + 239, + 128, + 64, + 53, + 104, + 101, + 70, + 212, + 176, + 129, + 130, + 64, + 156, + 193, + 208, + 240, + 169, + 66, + 121, + 113, + 3, + 219, + 85, + 204, + 101, + 236, + 6, + 156, + 218, + 222, + 16, + 80, + 168, + 142, + 130, + 113, + 90, + 81, + 100, + 92, + 255, + 243, + 80, + 196, + 3, + 28, + 226, + 206, + 202, + 84, + 97, + 138, + 156, + 100, + 220, + 136, + 57, + 58, + 30, + 118, + 19, + 232, + 69, + 2, + 229, + 182, + 83, + 138, + 166, + 81, + 56, + 1, + 176, + 105, + 166, + 163, + 47, + 253, + 204, + 179, + 63, + 216, + 56, + 60, + 86, + 127, + 235, + 115, + 106, + 76, + 149, + 134, + 243, + 251, + 20, + 15, + 117, + 186, + 197, + 155, + 71, + 42, + 24, + 208, + 155, + 49, + 52, + 51, + 190, + 175, + 35, + 181, + 165, + 171, + 218, + 247, + 202, + 87, + 82, + 215, + 36, + 206, + 236, + 133, + 179, + 212, + 212, + 138, + 158, + 173, + 85, + 149, + 159, + 125, + 89, + 149, + 153, + 239, + 41, + 122, + 25, + 23, + 220, + 115, + 75, + 36, + 82, + 183, + 145, + 228, + 96, + 117, + 195, + 189, + 188, + 177, + 230, + 37, + 130, + 224, + 181, + 217, + 221, + 66, + 161, + 154, + 210, + 187, + 239, + 0, + 255, + 243, + 80, + 196, + 4, + 29, + 243, + 202, + 189, + 149, + 73, + 56, + 0, + 1, + 133, + 66, + 4, + 117, + 170, + 178, + 15, + 36, + 232, + 160, + 73, + 213, + 70, + 159, + 145, + 41, + 59, + 173, + 97, + 115, + 142, + 56, + 229, + 83, + 158, + 198, + 158, + 72, + 171, + 76, + 99, + 198, + 135, + 156, + 121, + 82, + 37, + 136, + 132, + 99, + 3, + 134, + 90, + 99, + 51, + 215, + 152, + 81, + 106, + 115, + 169, + 205, + 232, + 143, + 78, + 181, + 243, + 166, + 171, + 52, + 137, + 140, + 200, + 227, + 196, + 157, + 209, + 168, + 157, + 118, + 99, + 21, + 18 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 14, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 65, + 77, + 6, + 6, + 111, + 63, + 221, + 98, + 155, + 205, + 17, + 144, + 220, + 71, + 68, + 164, + 88, + 219, + 185, + 100, + 154, + 40, + 178, + 173, + 24, + 253, + 15, + 52, + 206, + 56, + 97, + 157, + 247, + 134, + 180, + 179, + 180, + 185, + 70, + 69, + 16, + 136, + 182, + 168, + 218, + 97, + 14, + 90, + 46, + 115, + 224, + 229, + 152, + 10, + 187, + 83, + 97, + 202, + 205, + 210, + 121, + 242, + 141, + 221, + 1, + 63, + 101, + 66, + 239, + 72, + 194, + 149, + 173, + 76, + 89, + 171, + 185, + 209, + 243, + 117, + 33, + 218, + 136, + 155, + 210, + 116, + 154, + 210, + 230, + 10, + 173, + 226, + 204, + 12, + 16, + 180, + 8, + 97, + 128, + 192, + 10, + 5, + 181, + 32, + 176, + 82, + 36, + 255, + 243, + 80, + 196, + 12, + 27, + 177, + 186, + 198, + 76, + 123, + 6, + 28, + 170, + 20, + 3, + 65, + 44, + 75, + 126, + 165, + 179, + 59, + 182, + 250, + 151, + 33, + 223, + 156, + 206, + 172, + 6, + 22, + 96, + 241, + 11, + 180, + 12, + 112, + 130, + 25, + 55, + 253, + 36, + 3, + 22, + 38, + 157, + 244, + 161, + 196, + 127, + 201, + 87, + 247, + 119, + 52, + 71, + 174, + 250, + 17, + 124, + 111, + 255, + 222, + 226, + 4, + 36, + 131, + 105, + 2, + 41, + 195, + 147, + 65, + 248, + 129, + 30, + 34, + 11, + 48, + 64, + 34, + 84, + 153, + 250, + 5, + 172, + 59, + 68, + 16, + 36, + 151, + 251, + 83, + 94, + 25, + 88, + 173, + 41, + 106, + 212, + 227, + 207, + 88, + 172, + 218, + 28, + 59, + 214, + 32, + 170, + 161, + 207, + 45, + 146, + 84, + 137, + 90, + 117, + 38, + 213, + 247, + 9, + 68, + 10, + 100, + 91, + 59, + 129, + 255, + 243, + 80, + 196, + 18, + 32, + 225, + 162, + 214, + 84, + 123, + 16, + 152, + 126, + 31, + 226, + 132, + 174, + 92, + 140, + 168, + 16, + 88, + 171, + 22, + 253, + 215, + 158, + 197, + 86, + 250, + 206, + 165, + 118, + 60, + 100, + 154, + 7, + 144, + 161, + 139, + 232, + 215, + 59, + 61, + 61, + 13, + 204, + 84, + 119, + 35, + 138, + 146, + 20, + 21, + 54, + 161, + 215, + 170, + 226, + 85, + 76, + 1, + 38, + 184, + 26, + 214, + 33, + 95, + 233, + 212, + 39, + 247, + 51, + 7, + 88, + 84, + 232, + 6, + 30, + 197, + 140, + 139, + 8, + 195, + 166, + 129, + 149, + 165, + 13, + 239, + 128, + 64, + 53, + 104, + 101, + 70, + 212, + 176, + 129, + 130, + 64, + 156, + 193, + 208, + 240, + 169, + 66, + 121, + 113, + 3, + 219, + 85, + 204, + 101, + 236, + 6, + 156, + 218, + 222, + 16, + 80, + 168, + 142, + 130, + 113, + 90, + 81, + 100, + 92, + 255, + 243, + 80, + 196, + 3, + 28, + 226, + 206, + 202, + 84, + 97, + 138, + 156, + 100, + 220, + 136, + 57, + 58, + 30, + 118, + 19, + 232, + 69, + 2, + 229, + 182, + 83, + 138, + 166, + 81, + 56, + 1, + 176, + 105, + 166, + 163, + 47, + 253, + 204, + 179, + 63, + 216, + 56, + 60, + 86, + 127, + 235, + 115, + 106, + 76, + 149, + 134, + 243, + 251, + 20, + 15, + 117, + 186, + 197, + 155, + 71, + 42, + 24, + 208, + 155, + 49, + 52, + 51, + 190, + 175, + 35, + 181, + 165, + 171, + 218, + 247, + 202, + 87, + 82, + 215, + 36, + 206, + 236, + 133, + 179, + 212, + 212, + 138, + 158, + 173, + 85, + 149, + 159, + 125, + 89, + 149, + 153, + 239, + 41, + 122, + 25, + 23, + 220, + 115, + 75, + 36, + 82, + 183, + 145, + 228, + 96, + 117, + 195, + 189, + 188, + 177, + 230, + 37, + 130, + 224, + 181, + 217, + 221, + 66, + 161, + 154, + 210, + 187, + 239, + 0, + 255, + 243, + 80, + 196, + 4, + 29, + 243, + 202, + 189, + 149, + 73, + 56, + 0, + 1, + 133, + 66, + 4, + 117, + 170, + 178, + 15, + 36, + 232, + 160, + 73, + 213, + 70, + 159, + 145, + 41, + 59, + 173, + 97, + 115, + 142, + 56, + 229, + 83, + 158, + 198, + 158, + 72, + 171, + 76, + 99, + 198, + 135, + 156, + 121, + 82, + 37, + 136, + 132, + 99, + 3, + 134, + 90, + 99, + 51, + 215, + 152, + 81, + 106, + 115, + 169, + 205, + 232, + 143, + 78, + 181, + 243, + 166, + 171, + 52, + 137, + 140, + 200, + 227, + 196, + 157, + 209, + 168, + 157, + 118, + 99, + 21, + 18 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 14, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/end-to-end/structured-append-15/input.png b/tests/end-to-end/structured-append-15/input.png new file mode 100644 index 00000000..4425bbda Binary files /dev/null and b/tests/end-to-end/structured-append-15/input.png differ diff --git a/tests/end-to-end/structured-append-15/output.json b/tests/end-to-end/structured-append-15/output.json new file mode 100644 index 00000000..3180cbac --- /dev/null +++ b/tests/end-to-end/structured-append-15/output.json @@ -0,0 +1,560 @@ +{ + "binaryData": [ + 150, + 58, + 244, + 209, + 41, + 175, + 49, + 167, + 185, + 239, + 218, + 238, + 98, + 51, + 209, + 38, + 142, + 24, + 114, + 167, + 84, + 211, + 255, + 251, + 53, + 213, + 45, + 75, + 91, + 233, + 244, + 178, + 186, + 29, + 203, + 51, + 107, + 38, + 216, + 116, + 14, + 98, + 64, + 255, + 243, + 112, + 196, + 1, + 40, + 251, + 134, + 125, + 129, + 144, + 104, + 0, + 13, + 16, + 32, + 0, + 9, + 7, + 180, + 85, + 136, + 136, + 55, + 40, + 197, + 28, + 44, + 124, + 44, + 133, + 184, + 25, + 64, + 165, + 9, + 247, + 232, + 137, + 232, + 114, + 20, + 179, + 46, + 4, + 20, + 10, + 8, + 124, + 18, + 213, + 85, + 243, + 83, + 193, + 201, + 16, + 64, + 10, + 223, + 249, + 80, + 94, + 128, + 76, + 143, + 33, + 45, + 30, + 38, + 58, + 215, + 255, + 143, + 192, + 51, + 130, + 42, + 19, + 208, + 156, + 146, + 164, + 176, + 84, + 68, + 218, + 165, + 85, + 171, + 255, + 2, + 100, + 23, + 160, + 50, + 65, + 98, + 84, + 72, + 147, + 132, + 20, + 17, + 224, + 82, + 141, + 2, + 162, + 93, + 171, + 251, + 43, + 255, + 248, + 23, + 37, + 208, + 29, + 193, + 28, + 127, + 10, + 169, + 52, + 188, + 102, + 35, + 35, + 20, + 118, + 8, + 24, + 36, + 195, + 14, + 58, + 43, + 90, + 235, + 250, + 215, + 87, + 255, + 249, + 112, + 63, + 128, + 5, + 37, + 193, + 42, + 30, + 0, + 146, + 135, + 225, + 47, + 26, + 70, + 65, + 76, + 234, + 3, + 180, + 154, + 104, + 32, + 36, + 144, + 246, + 51, + 85, + 85, + 153, + 87, + 76, + 65, + 77, + 69, + 51, + 46, + 255, + 243, + 16, + 196, + 6, + 0, + 0, + 3, + 72, + 1, + 192, + 0, + 0, + 57, + 57, + 46, + 53, + 85, + 85, + 85, + 85, + 85, + 85, + 85, + 85, + 85 + ], + "data": "", + "chunks": [ + { + "type": "structuredappend", + "M": 15, + "N": 15, + "parity": 109 + }, + { + "type": "byte", + "bytes": [ + 150, + 58, + 244, + 209, + 41, + 175, + 49, + 167, + 185, + 239, + 218, + 238, + 98, + 51, + 209, + 38, + 142, + 24, + 114, + 167, + 84, + 211, + 255, + 251, + 53, + 213, + 45, + 75, + 91, + 233, + 244, + 178, + 186, + 29, + 203, + 51, + 107, + 38, + 216, + 116, + 14, + 98, + 64, + 255, + 243, + 112, + 196, + 1, + 40, + 251, + 134, + 125, + 129, + 144, + 104, + 0, + 13, + 16, + 32, + 0, + 9, + 7, + 180, + 85, + 136, + 136, + 55, + 40, + 197, + 28, + 44, + 124, + 44, + 133, + 184, + 25, + 64, + 165, + 9, + 247, + 232, + 137, + 232, + 114, + 20, + 179, + 46, + 4, + 20, + 10, + 8, + 124, + 18, + 213, + 85, + 243, + 83, + 193, + 201, + 16, + 64, + 10, + 223, + 249, + 80, + 94, + 128, + 76, + 143, + 33, + 45, + 30, + 38, + 58, + 215, + 255, + 143, + 192, + 51, + 130, + 42, + 19, + 208, + 156, + 146, + 164, + 176, + 84, + 68, + 218, + 165, + 85, + 171, + 255, + 2, + 100, + 23, + 160, + 50, + 65, + 98, + 84, + 72, + 147, + 132, + 20, + 17, + 224, + 82, + 141, + 2, + 162, + 93, + 171, + 251, + 43, + 255, + 248, + 23, + 37, + 208, + 29, + 193, + 28, + 127, + 10, + 169, + 52, + 188, + 102, + 35, + 35, + 20, + 118, + 8, + 24, + 36, + 195, + 14, + 58, + 43, + 90, + 235, + 250, + 215, + 87, + 255, + 249, + 112, + 63, + 128, + 5, + 37, + 193, + 42, + 30, + 0, + 146, + 135, + 225, + 47, + 26, + 70, + 65, + 76, + 234, + 3, + 180, + 154, + 104, + 32, + 36, + 144, + 246, + 51, + 85, + 85, + 153, + 87, + 76, + 65, + 77, + 69, + 51, + 46, + 255, + 243, + 16, + 196, + 6, + 0, + 0, + 3, + 72, + 1, + 192, + 0, + 0, + 57, + 57, + 46, + 53, + 85, + 85, + 85, + 85, + 85, + 85, + 85, + 85, + 85 + ], + "text": "" + } + ], + "structuredAppend": { + "M": 15, + "N": 15, + "parity": 109 + }, + "location": { + "topRightCorner": { + "x": 254.99999999999997, + "y": 12.000000000000002 + }, + "topLeftCorner": { + "x": 12.000000000000002, + "y": 12.000000000000002 + }, + "bottomRightCorner": { + "x": 254.99999999999997, + "y": 254.99999999999997 + }, + "bottomLeftCorner": { + "x": 12.000000000000002, + "y": 254.99999999999997 + }, + "topRightFinderPattern": { + "x": 244.5, + "y": 22.5 + }, + "topLeftFinderPattern": { + "x": 22.5, + "y": 22.5 + }, + "bottomLeftFinderPattern": { + "x": 22.5, + "y": 244.5 + }, + "bottomRightAlignmentPattern": { + "x": 235.5, + "y": 235.5 + } + } +} \ No newline at end of file diff --git a/tests/helpers.ts b/tests/helpers.ts index f5249400..47e2d45d 100644 --- a/tests/helpers.ts +++ b/tests/helpers.ts @@ -32,6 +32,20 @@ export async function loadPng(path) { return out; } +export function loadPngSync(path) { + const data = png.decode(fs.readFileSync(path)); + const out: { + data: Uint8ClampedArray, + height: number, + width: number, + } = { + data: png.toRGBA8(data), + height: data.height, + width: data.width, + }; + return out; +} + export async function loadBinarized(path) { const image = await loadPng(path); const out = BitMatrix.createEmpty(image.width, image.height); diff --git a/tests/structured-append-test.ts b/tests/structured-append-test.ts new file mode 100644 index 00000000..fe2d1761 --- /dev/null +++ b/tests/structured-append-test.ts @@ -0,0 +1,100 @@ +import * as fs from "fs-extra"; +import * as path from "path"; +import jsQR from "../src"; +import { loadPng } from "../tests/helpers"; +import * as helpers from "./helpers"; +import { strict as assert } from 'assert'; + + +// Fisher-Yates-Durstenfeld shuffle +// https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array +Array.prototype.shuffle = function() { + for (let i = this.length - 1; i > 0; i--) { + const j = Math.floor(Math.random() * (i + 1)); + [this[i], this[j]] = [this[j], this[i]]; + } +} + +if(typeof Array.prototype.flat === 'undefined') { + // polyfill + Array.prototype.flat = function() { + return (new Array()).concat(...this); + } +} + + +describe("structured-append", () => { + const pieces = [].concat(...fs.readdirSync(path.join("tests", "end-to-end")).filter((n) => n.includes("structured-append-"))); + const expectedOutput = [].concat(...fs.readFileSync(path.join("tests", "amen.mp3"))); + + // randomize the codes, to demonstrate that we can reconstruct the full data + // from any misordering, just by using the embedded headers. + pieces.shuffle(); + + var N; + var parity; + let blocks = new Array(); + var i = 0; + + describe.each(pieces)('piece %s', (p) => { + const inputImage = helpers.loadPngSync(path.join("tests", "end-to-end", p, "input.png")); + const result = jsQR(inputImage.data, inputImage.width, inputImage.height); + + it('loads binary data', () => { + expect(result.binaryData).toBeInstanceOf(Array); + + expect(result.data).toEqual(""); // 'data' i.e. 'text' should be empty because there's no text in binary! + expect(result.binaryData).toBeInstanceOf(Array /*TODO: change API to Uint8Array*/); + expect(result.binaryData.length).toBeGreaterThan(0); + }); + + if(typeof N === 'undefined') { + N = result.structuredAppend.N; + } + + if(typeof parity === 'undefined') { + parity = result.structuredAppend.parity; + } + + it('reads page numbers', () => { + // page numbers are 4 bits and 1-based (so 1..16 inclusive) + // The QR standard, section 9.2, explains that it stores them 0-based but counts them 1-based: + // > The 4-bit patterns shall be the binary equivalents of (m - 1) and (n - 1) respectively. + // or in short, 0 { + const reconstructed = blocks.flat(); + it('reconstructs', () => { + expect(blocks.length).toEqual(N); + expect(reconstructed).toEqual(expectedOutput); + } + it('parity checks out', () => { + // parity is the xor of all data bytes in the message; see QR spec section 9.3. + // TODO: test how parity interacts with mixed-mode QR codes;  + expect(reconstructed.reduce((acc, val) => acc^val, 0)).toEqual(parity); + }); + + })); +});