defect in brotli decode on windows: error code CL_SPACE #379

Closed
opened 2026-01-29 20:42:58 +00:00 by claunia · 2 comments
Owner

Originally created by @prettydiff on GitHub (Mar 23, 2021).

What does error code CL_SPACE mean? I cannot find anything about this. There is only a single mention of that string in all of this repository, which is found in decode.h.

I am generating an error where the code looks correct, everything is correct when brotli compression is bypassed, and works correctly when I reverse the destination and source. I am starting to think this is a brotli error on Windows via Node.js.

Please see this issue for technical details: https://github.com/nodejs/help/issues/3284

Originally created by @prettydiff on GitHub (Mar 23, 2021). What does error code CL_SPACE mean? I cannot find anything about this. There is only a single mention of that string in all of this repository, which is found in decode.h. I am generating an error where the code looks correct, everything is correct when brotli compression is bypassed, and works correctly when I reverse the destination and source. I am starting to think this is a brotli error on Windows via Node.js. Please see this issue for technical details: https://github.com/nodejs/help/issues/3284
Author
Owner

@eustas commented on GitHub (Mar 23, 2021):

"CL_SPACE" is a format error, when 2-nd level histogram sum is not exactly 32 (does not fill prefix code space, or overfills it).

I'm sure this explanation does not make things more clear. That is why this error code belongs to the wider "ERROR_FORMAT" group, which could be simply explained as "input is corrupted".

Going to take a look at the mentioned issue soon.

@eustas commented on GitHub (Mar 23, 2021): "CL_SPACE" is a format error, when 2-nd level histogram sum is not exactly 32 (does not fill prefix code space, or overfills it). I'm sure this explanation does not make things more clear. That is why this error code belongs to the wider "ERROR_FORMAT" group, which could be simply explained as "input is corrupted". Going to take a look at the mentioned issue soon.
Author
Owner

@prettydiff commented on GitHub (Mar 26, 2021):

I added some extra tests without a relay prior to my tests with the relay. I can confirm these conditions hold true:

  • Copy files from Windows to Linux without relay and without compression
  • Copy files from Windows to Linux without relay and with compression
  • Copy files from Linux to Windows without relay and without compression
  • Copy files from Linux to Windows without relay and with compression
  • Copy files from Windows to Linux with relay and without compression
  • Copy files from Windows to Linux with relay and with compression
  • Copy files from Linux to Windows with relay and without compression
  • Copy files from Linux to Windows with relay and with compression -- fail with CL_SPACE 100% of multiple attempts

I have already taken your guidance opened an issue with the Node project days ago. Now I will close this issue and pursue it with the node team.

For anybody reading this comment please note my test automation only executes tests using brotli compression. Testing without brotli is manual.

@prettydiff commented on GitHub (Mar 26, 2021): I added some extra tests without a relay prior to my tests with the relay. I can confirm these conditions hold true: * [x] Copy files from Windows to Linux without relay and without compression * [x] Copy files from Windows to Linux without relay and with compression * [x] Copy files from Linux to Windows without relay and without compression * [x] Copy files from Linux to Windows without relay and with compression * [x] Copy files from Windows to Linux with relay and without compression * [x] Copy files from Windows to Linux with relay and with compression * [x] Copy files from Linux to Windows with relay and without compression * [ ] Copy files from Linux to Windows with relay and with compression -- **fail** with CL_SPACE 100% of multiple attempts I have already taken your guidance opened an issue with the Node project days ago. Now I will close this issue and pursue it with the node team. For anybody reading this comment please note my test automation only executes tests using brotli compression. Testing without brotli is manual.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#379