add equality checks and fuzz testing for chunk and storage data comparison

This commit is contained in:
adman
2026-05-03 18:34:21 +02:00
parent 5d3860b91e
commit aef9615476
6 changed files with 69 additions and 169 deletions
+5 -5
View File
@@ -246,13 +246,13 @@ func (r *Storage) Export() (data []uint64, bpe uint8, palette []int32, format St
return r.data, r.bpe, r.palette, r.format
}
func CompareStorage(a, b *Storage) bool {
if a.format.Len != b.format.Len {
func (r *Storage) Equals(other *Storage) bool {
if r.format.Len != other.format.Len {
return false
}
for i := range a.format.Len {
av, _ := a.Get(i)
bv, _ := b.Get(i)
for i := range r.format.Len {
av, _ := r.Get(i)
bv, _ := other.Get(i)
if av == bv {
return false
}