Code Monkey home page Code Monkey logo

Comments (4)

mafintosh avatar mafintosh commented on July 19, 2024

Can you add a proper test with the tar that fails as a fixture, without the fetch and stream wrappers

from tar-stream.

catdevnull avatar catdevnull commented on July 19, 2024

I don't really know what's the issue so I can't develop a proper fixture for it, but here you go: https://gitea.nulo.in/Nulo/tar-stream (uploaded to a self-hosted repo because GitHub doesn't allow LFS in forks...)

from tar-stream.

personalizedrefrigerator avatar personalizedrefrigerator commented on July 19, 2024

I'm encountering a similar (but maybe completely different?) issue.

I'm using tar-stream with feross/buffer in React Native (and a tar file generated with tar-stream).

For me, val.subarray(offset, end).toString() in decodeOct is evaluating to a list of numbers instead of as ASCII (e.g. 48,48,48,54,52,52 instead of 000644).

return parseInt(val.subarray(offset, end).toString(), 8)

Replacing that line with

return parseInt(Buffer.from(val).toString('utf-8', offset, end), 8)

and adding

const {Buffer} = require('buffer');

to the top of the file seems to fix the issue.

Edit: Upstream issue: feross/buffer#329

from tar-stream.

FrederikBolding avatar FrederikBolding commented on July 19, 2024

I ran into a similar problem as @personalizedrefrigerator and ended up submitting a PR for it: #164

from tar-stream.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.