* Get the decoded (decompressed) stream data. * * Applies any filters specified in /Filter in order. * Results are not cached - call once and store if needed. * * @returns Decoded data * @throws {Error} if a filter fails or is unknown
()
| 106 | * @throws {Error} if a filter fails or is unknown |
| 107 | */ |
| 108 | getDecodedData(): Uint8Array { |
| 109 | const filterEntry = this.get("Filter"); |
| 110 | |
| 111 | // No filter - return raw data |
| 112 | if (!filterEntry) { |
| 113 | return this._data; |
| 114 | } |
| 115 | |
| 116 | // Build filter specs |
| 117 | const filterSpecs = this.buildFilterSpecs(filterEntry); |
| 118 | |
| 119 | if (filterSpecs.length === 0) { |
| 120 | return this._data; |
| 121 | } |
| 122 | |
| 123 | // Decode through filter pipeline |
| 124 | return FilterPipeline.decode(this._data, filterSpecs); |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Get the encoded (compressed) stream data. |
no test coverage detected