Buffer added and conditionally compresses js