ndr_compression: add common parts of ndr compression