Implementing in-memory compression for objects in Java

后端 未结 8 1962
忘了有多久
忘了有多久 2020-12-13 02:29

We have this use case where we would like to compress and store objects (in-memory) and decompress them as and when required.

The data we want to compress is quite

8条回答
  •  南笙
    南笙 (楼主)
    2020-12-13 02:30

    The best compression technology I know is ZIP. Java supports ZipStream. All you need is to serialize your object into byte array and then zip it.

    Tips: Use ByteArrayOutputStream, DataStream, ZipOutputStream.

提交回复
热议问题