Have a use case where I need to compress and store a org.bson.Document into cache. I am using zstd compression which expects a byte array. Not able to find a way to convert Document into byte array.
Asked
Active
Viewed 695 times
1 Answers
1
Only way I know of is to go via a JSON file, and then to a ByteArray.
You would then have to go via a JSON back to BsonDocument for when you want to use it again.

Hellothisisme
- 58
- 5