Json compression for transfer

被刻印的时光 ゝ 提交于 2020-01-04 04:15:30

问题


I was wondering what the current state of javascript based json compression is. Are there any libraries currently available that allow compressing json, either by replacing long names with single characters, or some other method?


回答1:


Someone has implemented HPack in Javascript, which could really improve JSON data set sizes, assuming your data set is homogeneous.

Since your emphasis is on transfer, rather than storage, don't forget to use things like gzip and to minimise your JSON. Those should be the first steps before adding yet more compression overhead.



来源:https://stackoverflow.com/questions/11774375/json-compression-for-transfer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!