Merged with master

This commit is contained in:
Andreas T Jonsson
2024-05-02 09:27:46 +02:00
70 changed files with 1571 additions and 795 deletions
+4 -4
View File
@@ -1043,8 +1043,8 @@ __write_bits :: proc "contextless" (dst, src: [^]byte, offset: uintptr, size: ui
for i in 0..<size {
j := offset+i
the_bit := byte((src[i>>3]) & (1<<(i&7)) != 0)
b := the_bit<<(j&7)
dst[j>>3] = (dst[j>>3] &~ b) | b
dst[j>>3] &~= 1<<(j&7)
dst[j>>3] |= the_bit<<(j&7)
}
}
@@ -1052,7 +1052,7 @@ __read_bits :: proc "contextless" (dst, src: [^]byte, offset: uintptr, size: uin
for j in 0..<size {
i := offset+j
the_bit := byte((src[i>>3]) & (1<<(i&7)) != 0)
b := the_bit<<(j&7)
dst[j>>3] = (dst[j>>3] &~ b) | b
dst[j>>3] &~= 1<<(j&7)
dst[j>>3] |= the_bit<<(j&7)
}
}