Use cases for this are mainly used for in-memory databases, so you should probably study them.
If you did this, you would probably have to basically serialize arbitrary java objects into bytes, and then reflect them back into classes. It can also use a database in memory - there is no real difference that I can see anyway, other than this java, probably a bit of a high level for this kind of thing.
Note that this is actually somewhat specific to java - maybe in C you might have a library that will grab memory and just compress it without doing any fancy stuff, but since Java does not have access to memory it makes it a little more complicated ...
source share