Title: compression: empty input marks BZ2/LZMA decompressors as EOF · Issue #8637 · RustPython/RustPython · GitHub
Open Graph Title: compression: empty input marks BZ2/LZMA decompressors as EOF · Issue #8637 · RustPython/RustPython
X Title: compression: empty input marks BZ2/LZMA decompressors as EOF · Issue #8637 · RustPython/RustPython
Description: Summary Calling decompress(b"") before compressed input marks BZ2Decompressor and LZMADecompressor as finished. Expected Empty input should be a no-op. CPython keeps eof false and needs_input true, then accepts compressed data supplied b...
Open Graph Description: Summary Calling decompress(b"") before compressed input marks BZ2Decompressor and LZMADecompressor as finished. Expected Empty input should be a no-op. CPython keeps eof false and needs_input true,...
X Description: Summary Calling decompress(b"") before compressed input marks BZ2Decompressor and LZMADecompressor as finished. Expected Empty input should be a no-op. CPython keeps eof false and needs_i...
Opengraph URL: https://github.com/RustPython/RustPython/issues/8637
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"compression: empty input marks BZ2/LZMA decompressors as EOF","articleBody":"## Summary\n\nCalling `decompress(b\"\")` before compressed input marks `BZ2Decompressor`\nand `LZMADecompressor` as finished.\n\n## Expected\n\nEmpty input should be a no-op. CPython keeps `eof` false and `needs_input`\ntrue, then accepts compressed data supplied by a later call:\n\n```text\nBZ2Decompressor False True\nb'data'\nLZMADecompressor False True\nb'data'\n```\n\n## Actual\n\nRustPython marks both decompressors as finished and rejects a later input:\n\n```text\nBZ2Decompressor True False\nEOFError: End of stream already reached\nLZMADecompressor True False\nEOFError: End of stream already reached\n```\n\n## Python Documentation\n\n- https://docs.python.org/3/library/bz2.html#bz2.BZ2Decompressor\n- https://docs.python.org/3/library/lzma.html#lzma.LZMADecompressor\n","author":{"url":"https://github.com/doma17","@type":"Person","name":"doma17"},"datePublished":"2026-09-02T01:24:46Z","url":"https://github.com/RustPython/RustPython/issues/8637"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:7f2d1031-88f1-0672-53d9-20737c772c6c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D11C:1FAE:E6A7D3:135A989:6B02084C |
| html-safe-nonce | 0030057c75525a7068b4b00a15a7d7a50a9b045593c18d276adf5b677bc72773 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTFDOjFGQUU6RTZBN0QzOjEzNUE5ODk6NkIwMjA4NEMiLCJ2aXNpdG9yX2lkIjoiNDM2MTk4NDczMDUzMTQ5ODA2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d15d5d7e12d4822c94e1e5a3e900941a23190896175725668193d503503f2951 |
| hovercard-subject-tag | issue:5318610446 |
| 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/RustPython/RustPython/8637/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f77dd0ff759df4527f2d37afd24cf8ccfd81e6109368b8dc6a5617bd16cc65fa/RustPython/RustPython/issues/8637 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f77dd0ff759df4527f2d37afd24cf8ccfd81e6109368b8dc6a5617bd16cc65fa/RustPython/RustPython/issues/8637 |
| og:image:alt | Summary Calling decompress(b"") before compressed input marks BZ2Decompressor and LZMADecompressor as finished. Expected Empty input should be a no-op. CPython keeps eof false and needs_input true,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | doma17 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width