Why data compression can not change java

On an article that primitive arrays can be stored in a compressed, because the base type of the array is a fixed storage space


  • Changes in the data we use reference type array to an example

Reference type of storage array, we change the value through the object in the array, but the length of his space will not be fixed, this is a reference type arrays and arrays of primitive types there is a difference. Therefore, an array of reference type can not be stored in a compressed, its space may vary in length.
If several storage space will be compressed storage arrays change occurs, it can cause memory overflow, which is not what we want to see, so the operating system will not be changed data compression and storage.
These are my opinions.

Guess you like

Origin blog.csdn.net/fight252/article/details/90748260