-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Closed as not planned
Closed as not planned
Copy link
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
from compression import zstd
options = {
zstd.CompressionParameter.content_size_flag: 1
}
# zstd.open() implementation should call set_pledged_input_size(10)
# should zstd set CompressionParameter.content_size_flag=1 automatically if uncompressed_size passed? I don't know. need to choose API.
with zstd.open("file.zst", "w", options=options, uncompressed_size=10) as f:
f.write(b"x"*8) # OK
f.write(b"aa") # OK
f.write(b"z") # should fail because too many data written. I guess in zstd internal code
# should fail on context exit (because to few data written). I guess in zstd internal code
with zstd.open("file.zst", "w", options=options, uncompressed_size=10) as f:
f.write(b"z") Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirpendingThe issue will be closed if no feedback is providedThe issue will be closed if no feedback is providedtype-featureA feature request or enhancementA feature request or enhancement
Projects
Status
Done