mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 23:06:16 -04:00
XZ compression
This commit is contained in:
parent
77a9481cf9
commit
b83f6591bb
1 changed files with 5 additions and 0 deletions
|
@ -2817,8 +2817,13 @@ export function extractZlib(bytes, offset) {
|
||||||
*/
|
*/
|
||||||
export function extractXZ(bytes, offset) {
|
export function extractXZ(bytes, offset) {
|
||||||
const stream = new Stream(bytes.slice(offset));
|
const stream = new Stream(bytes.slice(offset));
|
||||||
|
|
||||||
|
// Move forward to EOF marker
|
||||||
stream.continueUntil([0x00, 0x00, 0x00, 0x00, 0x04, 0x59, 0x5a]);
|
stream.continueUntil([0x00, 0x00, 0x00, 0x00, 0x04, 0x59, 0x5a]);
|
||||||
|
|
||||||
|
// Move over EOF marker
|
||||||
stream.moveForwardsBy(7);
|
stream.moveForwardsBy(7);
|
||||||
|
|
||||||
return stream.carve();
|
return stream.carve();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue