HTML minification

Is there anyway to remove all redundant spaces and line breaks from resulting HTML produced by a view object?