An integrated circuit, comprising: a substrate; and a hardware compressor coupled to the substrate to compress data, the hardware compressor including circuitry to: store input data in a history buffer, compute dynamic code tables based on the input data in a first pass of the input data, compute a compression stream header based on the computed dynamic code tables in the first pass, and provide multiple modes of operation for the hardware compressor, wherein, in one mode of operation, the circuitry is further to calculate an expected compressed size for both canned codes and the dynamic codes after the first pass, and load a set of code tables and a compression stream header, for a second pass of the input data to compress the input data, that corresponds to either the dynamic codes or the canned codes based on a lower result of the respective calculated expected compressed sizes, wherein the canned codes are a priori determined, and the compression stream header corresponding to the dynamic codes is the computed compression stream header in the first pass and the compression stream header corresponding to the canned codes is a null header. a substrate; and a hardware compressor coupled to the substrate to compress data, the hardware compressor including circuitry to: store input data in a history buffer, compute dynamic code tables based on the input data in a first pass of the input data, compute a compression stream header based on the computed dynamic code tables in the first pass, and provide multiple modes of operation for the hardware compressor, wherein, in one mode of operation, the circuitry is further to calculate an expected compressed size for both canned codes and the dynamic codes after the first pass, and load a set of code tables and a compression stream header, for a second pass of the input data to compress the input data, that corresponds to either the dynamic codes or the canned codes based on a lower result of the respective calculated expected compressed sizes, wherein the canned codes are a priori determined, and the compression stream header corresponding to the dynamic codes is the computed compression stream header in the first pass and the compression stream header corresponding to the canned codes is a null header. store input data in a history buffer, compute dynamic code tables based on the input data in a first pass of the input data, compute a compression stream header based on the computed dynamic code tables in the first pass, and provide multiple modes of operation for the hardware compressor, wherein, in one mode of operation, the circuitry is further to calculate an expected compressed size for both canned codes and the dynamic codes after the first pass, and load a set of code tables and a compression stream header, for a second pass of the input data to compress the input data, that corresponds to either the dynamic codes or the canned codes based on a lower result of the respective calculated expected compressed sizes, wherein the canned codes are a priori determined, and the compression stream header corresponding to the dynamic codes is the computed compression stream header in the first pass and the compression stream header corresponding to the canned codes is a null header.