Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

283
Vistas
pako.inflate() - Uncaught incorrect header check when trying to decompress data (ReactJS)

Good day. I am creating covid greenpass decoder in React App, and I need help with pako.js. I am trying to inflate Unit8Array which i got from base45 decoding. And I am getting "uncaught incorrect header check" error. I have tried adding {to: "string"} to inflate() method, or using inflateRaw(). I'll be greatful for help. Here's code:

import React from 'react';
import cbor from 'cbor-web';
import base45 from 'base45-js';

const CovidPass = () => {

    const pako = require('pako')

    const decodedBase45 = base45.decode('I2B-KEP2');
    console.log(decodedBase45);
    const decodedPako = pako.inflate(decodedBase45);
    console.log(decodedPako);

    return (
        <>
            <p>{decodedBase45}</p>
        </>
    );
}

export default CovidPass;

decodedBase45 looks like this in console:

Uint8Array(5) [87, 111, 114, 107, 115, buffer: ArrayBuffer(5), byteLength: 5, byteOffset: 0, length: 5, Symbol(Symbol.toStringTag): 'Uint8Array']
0: 87
1: 111
2: 114
3: 107
4: 115
buffer: 
ArrayBuffer(5)
byteLength: 5
byteOffset: 0
length: 5
Symbol(Symbol.toStringTag): "Uint8Array"
[[Prototype]]: Uint8Array

Or maybe you can tell me the way how to do it with zlib?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda