Rename copy_n32_etc to limited_copy_u32_etc

This commit is contained in:
Nigel Tao committed 2020-05-27 19:55:06 +10:00
1 parent e74fd729a7
commit 1ed0f89948
10 files changed
+97 -95

No files matched your search

+4 -3
View File
@@ -317,8 +317,8 @@ pri func decoder.decode_huffman_fast!(dst: base.io_writer, src: base.io_reader)
// This copying is simpler than the decode_huffman_slow version
// because it cannot yield. We have already checked that
// args.dst.available() is large enough.
args.dst.copy_n32_from_slice!(
n: hlen, s: this.history[hdist & 0x7FFF ..])
args.dst.limited_copy_u32_from_slice!(
up_to: hlen, s: this.history[hdist & 0x7FFF ..])
if length == 0 {
// No need to copy from args.dst.
@@ -339,7 +339,8 @@ pri func decoder.decode_huffman_fast!(dst: base.io_writer, src: base.io_reader)
assert (length as base.u64) <= args.dst.available() via "a <= b: a <= c; c <= b"(c: 258)
// Copy from args.dst.
args.dst.copy_n32_from_history_fast!(n: length, distance: (dist_minus_1 + 1))
args.dst.limited_copy_u32_from_history_fast!(
up_to: length, distance: (dist_minus_1 + 1))
break
} endwhile
} endwhile.loop