Implemented an *optional* compression/thresholding function that can be applied on the input samples.