Merge "Fix performance regression of libz." into main