Decrease object allocation overhead of compression detection