ugorji / go

idiomatic codec and rpc lib for msgpack, cbor, json, etc. msgpack.org[Go]
MIT License
1.85k stars 295 forks source link

MaxInitLen handler option is not documented in primer #311

Closed cvermilion closed 5 years ago

cvermilion commented 5 years ago

Actually, it looks like there are quite a few more encode/decode options documented in the godoc than in the section of the primer. Perhaps the best solution is a link in the primer section that says there are many more options in the godoc? There are enough mentioned in the primer that one might assume that discussion is comprehensive.

I hit this because I'd been relying on the primer and thus had not discovered this option. In my case this was quite painful because my application decodes messages with very large binary fields -- a MaxInitLen much smaller than your largest array to decode can cause severe performance penalties.

ugorji commented 5 years ago

Thanks for raising this issue.

I will add updating the primer to include all the options, and will also add a link to the godoc (just in case).

ugorji commented 5 years ago

I opted to just add the links to the godoc package documentation, with a note that there are more options viewable there.

I will not update to include all the options - but I might do it later.

Thanks.