llhttp icon indicating copy to clipboard operation
llhttp copied to clipboard

Is it allowed to share `lhttp_settings_t` between multiple parsers?

Open vitorb-rzero opened this issue 3 years ago • 1 comments

Pretty much the title question. I'm working on a memory constrained environment, so saving some bytes by reusing this struct would be great. All parsers would have the same settings, of course.

vitorb-rzero avatar Jun 30 '22 12:06 vitorb-rzero

Yes, there is no state in the callback table. As an example, @pallas/pyllhttp uses a single table for multiple parsers.

pallas avatar Jul 17 '22 22:07 pallas