fn simple_compress(rlp: &UntrustedRlp, swapper: &InvalidRlpSwapper) -> ElasticArray1024<u8> {
	if rlp.is_data() {
		to_elastic(swapper.get_invalid(rlp.as_raw()).unwrap_or_else(|| rlp.as_raw()))
	} else {
		map_rlp(rlp, |r| Some(simple_compress(r, swapper))).unwrap_or_else(|| to_elastic(rlp.as_raw()))
	}
}
/// Replace common RLPs with invalid shorter ones.
Replace common RLPs with invalid shorter ones.
Replace common RLPs with invalid shorter ones .
fn simple_compress(rlp: &UntrustedRlp, swapper: &InvalidRlpSwapper) -> ElasticArray1024<u8> {
	if rlp.is_data() {
		to_elastic(swapper.get_invalid(rlp.as_raw()).unwrap_or_else(|| rlp.as_raw()))
	} else {
		map_rlp(rlp, |r| Some(simple_compress(r, swapper))).unwrap_or_else(|| to_elastic(rlp.as_raw()))
	}
}
fn simple_compress ( rlp : & UntrustedRlp , swapper : & InvalidRlpSwapper ) -> ElasticArray1024 < u8 > { if rlp . is_data ( ) { to_elastic ( swapper . get_invalid ( rlp . as_raw ( ) ) . unwrap_or_else ( | | rlp . as_raw ( ) ) ) } else { map_rlp ( rlp , | r | Some ( simple_compress ( r , swapper ) ) ) . unwrap_or_else ( | | to_elastic ( rlp . as_raw ( ) ) ) } }
Replace common RLPs with invalid shorter ones.
Replace common RLPs with invalid shorter ones .
rlp
&UntrustedRlp
swapper
&InvalidRlpSwapper