43081j / 43081j/rar.js

Blob has overhead bytes

オープン
#3 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
513
フォーク
52
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello,

I just noticed the Blob one retrieves by RarArchive.get() contains an overhead.

Split archive with 4 Parts:
![test1](https://f.cloud.github.com/assets/4035667/2479088/1e5fffd0-b08f-11e3-81ca-1a2c036126f8.png)

Single Archive:
![test2](https://f.cloud.github.com/assets/4035667/2479093/3c419856-b08f-11e3-9640-325e6a58f8f1.png)

One can solve this by using
`blob = blob.slice(0, blob.size - (blob.size - val.sizePacked), blob.type);`
in the callback function, where 'val' is the RarEntry passed to RarArchive.get().

I personally think it is produced somewhere in your validaton and/or reading of the bytes from the archive, but I couldnt figure out where exactly, yet. :(

(If I do, I will inform you, but as for now, this workaround will do the job for me.)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。