Title: zlib.createUnzip does not throw error on unexpected end of file · Issue #2043 · nodejs/node · GitHub
Open Graph Title: zlib.createUnzip does not throw error on unexpected end of file · Issue #2043 · nodejs/node
X Title: zlib.createUnzip does not throw error on unexpected end of file · Issue #2043 · nodejs/node
Description: Here's the code: var zlib = require('zlib'); var fs = require('fs'); fs.createReadStream('test.gz') .pipe(zlib.createGunzip()) .on('error', function(err) { console.log("ERROR", err); }) .pipe(fs.createWriteStream('test')) .on('finish', f...
Open Graph Description: Here's the code: var zlib = require('zlib'); var fs = require('fs'); fs.createReadStream('test.gz') .pipe(zlib.createGunzip()) .on('error', function(err) { console.log("ERROR", err); }) .pipe(fs.cr...
X Description: Here's the code: var zlib = require('zlib'); var fs = require('fs'); fs.createReadStream('test.gz') .pipe(zlib.createGunzip()) .on('error', function(err) { conso...
Opengraph URL: https://github.com/nodejs/node/issues/2043
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"zlib.createUnzip does not throw error on unexpected end of file","articleBody":"Here's the code:\n\n``` js\nvar zlib = require('zlib');\nvar fs = require('fs');\n\nfs.createReadStream('test.gz') \n .pipe(zlib.createGunzip()) \n .on('error', function(err) {\n console.log(\"ERROR\", err);\n })\n .pipe(fs.createWriteStream('test')) \n .on('finish', function() {\n console.log(\"DONE\");\n });\n```\n\nI take a big valid `gz` file and do:\n\n```\nhead -n 100000 ~/valid.gz \u003e test.gz\n```\n\nNow `test.gz` is an unfinished archive:\n\n```\n\u003e gunzip -k test.gz\ngunzip: test.gz: unexpected end of file\ngunzip: test.gz: uncompress failed\n```\n\n...But the aforementioned script shows DONE on this (unfinished) archive. No error.\nThere should be.\n","author":{"url":"https://github.com/iliakan","@type":"Person","name":"iliakan"},"datePublished":"2015-06-23T21:09:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/2043/node/issues/2043"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:de3f43be-fe7d-dc3e-49a1-d38c351197f6 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 98BC:18C93:2983582:392B8D7:6A4EFEB6 |
| html-safe-nonce | 0c2614d88a3c86484bf019cc4d07f2aec9a8c7fc9228091d80458ba9bc4559da |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEJDOjE4QzkzOjI5ODM1ODI6MzkyQjhENzo2QTRFRkVCNiIsInZpc2l0b3JfaWQiOiIzOTU4OTE4NjYyNzIzNjY1NTkwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4a1c3cf50c2bdf7874039c003431adb4d3e43f792bb2d6b03695d5f5ca1f3ca8 |
| hovercard-subject-tag | issue:90490959 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/2043/issue_layout |
| twitter:image | https://opengraph.githubassets.com/412977458ee00faa3a0a4373de47be20358f60651aa510b712fd78ddd1e7099c/nodejs/node/issues/2043 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/412977458ee00faa3a0a4373de47be20358f60651aa510b712fd78ddd1e7099c/nodejs/node/issues/2043 |
| og:image:alt | Here's the code: var zlib = require('zlib'); var fs = require('fs'); fs.createReadStream('test.gz') .pipe(zlib.createGunzip()) .on('error', function(err) { console.log("ERROR", err); }) .pipe(fs.cr... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | iliakan |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width