I read the following bit from ORACLE :
Can I execute methods in compressed versions of my objects like isempty (zip (serial (x)))?
This is not realistic for any objects due to the encoding of objects. For a specific object (e.g. String) you can compare the received bitstreams. The encoding is stable, because each time the same object is encoded, it is encoded into the same set of bits.
So, I got this idea, say, if I have a char array from 4M something long, is it possible for me to compress it to several hundred bytes with GZIPOutputStream, and then display the entire file in memory, and do an arbitrary search on it by comparing bit? Say, if I'm looking for a char sequence "abcd", can I somehow get the bit sequence of the compressed version "abcd", and then just search for it? Thank.
source
share