MCPcopy
hub / github.com/gchq/CyberChef / parseCompressionMethods

Function parseCompressionMethods

src/core/lib/TLS.mjs:296–310  ·  view source on GitHub ↗

* Parse Compression Methods * @param {Uint8Array} bytes * @returns {JSON}

(bytes)

Source from the content-addressed store, hash-verified

294 * @returns {JSON}
295 */
296function parseCompressionMethods(bytes) {
297 const s = new Stream(bytes);
298 const b = s.clone();
299 const cm = [];
300
301 while (s.hasMore()) {
302 cm.push({
303 description: "Compression Method",
304 length: 1,
305 data: b.getBytes(1),
306 value: s.readInt(1) // TODO: Compression method name here
307 });
308 }
309 return cm;
310}
311
312/**
313 * Parse Extensions

Callers 1

parseClientHelloFunction · 0.85

Calls 4

cloneMethod · 0.95
hasMoreMethod · 0.95
readIntMethod · 0.95
getBytesMethod · 0.80

Tested by

no test coverage detected