References: <[email protected]> <can4czfnuv2nkxbptgkn8chga01svgpucninm-hpdyfth0ej...@mail.gmail.com> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <[email protected]> <CAC+8b5imyLMnif=jbyndk9h6xlhagsp_yw2wtu-vtob34iq...@mail.gmail.com> <[email protected]> <cac+8b5ithrfccgst4wkcxkcoz5+dvmqr2mavj1gu6yhbbpv...@mail.gmail.com> <[email protected]> <can4czfm_raaxircf0jmhmnquac+9-3kygvu+uvc43vxh7bi...@mail.gmail.com> <[email protected]> User-Agent: mu4e 1.14.1; emacs 30.2 Hi Chao,
Thanks for updating the patch. Date: Thu, 13 Aug 2026 11:32:59 +0800 On Thu, 13 Aug 2026 at 09:47, Chao Li <[email protected]> wrote: >> On Aug 13, 2026, at 05:56, Zsolt Parragi <[email protected]> wrote: >> >> I have two minor comment for v5, otherwise it looks good to me: > > Hi Zsolt, > > Thanks a lot for reviewing. > >> >> +typedef enum >> +{ >> + STREAM_NEW, >> + STREAM_HAS_DATA, >> + STREAM_FINISHED, >> +} pg_stream_state; >> + >> >> This is duplicated in two files, wouldn't be astreamer.h a better place for >> it? > > I think this makes sense. Plus your second comment, this enum can be shared > by all 3 astreamers. I moved it to astreamer.h and renamed it to > astreamer_decompression_state. > The astreamer_decompression_state should be added to pgindent's typedefs.list. >> >> + if (!mystreamer->stream_finished) >> + pg_fatal("could not decompress data: compressed stream is incomplete"); >> + >> >> The other two checks distinguish empty from incomplete, is this >> difference intended? > > I do not think that is intentional. My initial implementation did not > check for an empty stream, and gzip uses a different pattern from zstd > and LZ4, which is probably why Daniel initially added the empty-stream > check only to zstd and lz4. > > I have now added the same check to gzip so that all three astreamers are > consistent. > > PFA v6: addressed Zsolt’s comments. > > Best regards, > -- > Chao Li (Evan) > HighGo Software Co., Ltd. > https://www.highgo.com/ -- Regards, Japin Li ChengDu WenWu Information Technology Co., Ltd.
