You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gzip package and strings.NewReader always return io.EOF when calling their Read methods with any size slice if the data is empty. However, the brotli Read method requires using a non-empty slice to read first for empty compressed data, and only subsequent reads can return io.EOF. If you continuously use an empty slice to read, io.EOF is never returned, potentially causing an infinite loop in certain scenarios.
Test
brotil first read never io.EOF for empty compressed data.
Description
The gzip package and strings.NewReader always return io.EOF when calling their Read methods with any size slice if the data is empty. However, the brotli Read method requires using a non-empty slice to read first for empty compressed data, and only subsequent reads can return io.EOF. If you continuously use an empty slice to read, io.EOF is never returned, potentially causing an infinite loop in certain scenarios.
Test
brotil first read never io.EOF for empty compressed data.
Gzip success with any order.
The text was updated successfully, but these errors were encountered: