golang/go

compress/flate: implement partial flush

Open

#31,514 opened on 2019年4月17日

GitHub で見る
 (20 comments) (0 reactions) (0 assignees)Go (19,008 forks)batch import
FeatureRequestNeedsFixhelp wanted

Repository metrics

Stars
 (133,883 stars)
PR merge metrics
 (30d に merged PR はありません)

説明

What version of Go are you using (go version)?

go-1.11.5

while trying to implement zlib compression for SSH (by internal Google request, https://github.com/golang/go/issues/31369), I stumbled on lack of support for partial flush.

partial flush is described more precisely here: https://www.bolet.org/~pornin/deflate-flush.html (look for Z_PARTIAL_FLUSH). While this is deprecated functionality, it has also made its way into the SSH RFC.

For the write side, it looks like I can't truncate the sync marker from a full flush to get the same effect.

For the read side, feeding packets from OpenSSH into zlib.Reader leads to errors ("unexpected EOF").

コントリビューターガイド