Rename some copy_from_xxx methods

This commit is contained in:
Nigel Tao committed 2018-07-08 13:56:49 +10:00
1 parent 732365b80d
commit 26eba56f57
17 files changed
+217 -218

No files matched your search

+5 -5
View File
@@ -206,8 +206,8 @@ pri func decoder.decode_huffman_slow?(dst base.io_writer, src base.io_reader)()
// Copy from hdist to the end of this.history.
while true {
n_copied = in.dst.copy_from_slice32!(
s:this.history[hdist & 0x7FFF:], length:hlen)
n_copied = in.dst.copy_n_from_slice!(
n:hlen, s:this.history[hdist & 0x7FFF:])
if hlen <= n_copied {
hlen = 0
break
@@ -226,8 +226,8 @@ pri func decoder.decode_huffman_slow?(dst base.io_writer, src base.io_reader)()
// Copy from the start of this.history, if we wrapped around.
if hlen > 0 {
while true {
n_copied = in.dst.copy_from_slice32!(
s:this.history[hdist & 0x7FFF:], length:hlen)
n_copied = in.dst.copy_n_from_slice!(
n:hlen, s:this.history[hdist & 0x7FFF:])
if hlen <= n_copied {
hlen = 0
break
@@ -246,7 +246,7 @@ pri func decoder.decode_huffman_slow?(dst base.io_writer, src base.io_reader)()
}
// Copy from in.dst.
n_copied = in.dst.copy_from_history32!(distance:(dist_minus_1 + 1), length:length)
n_copied = in.dst.copy_n_from_history!(n:length, distance:(dist_minus_1 + 1))
if length <= n_copied {
length = 0
break