Skip to content

Commit

Permalink
Optimized zero fill
Browse files Browse the repository at this point in the history
  • Loading branch information
LTRData committed Apr 4, 2024
1 parent ea4f3b2 commit 8aba74b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Library/DiscUtils.Ntfs/SecurityDescriptor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void WriteTo(Span<byte> buffer)
}
else
{
EndianUtilities.WriteBytesLittleEndian(0, buffer.Slice(0x10));
buffer.Slice(0x10).Clear();
}

var sysAcl = Descriptor.SystemAcl;
Expand All @@ -88,7 +88,7 @@ public void WriteTo(Span<byte> buffer)
}
else
{
EndianUtilities.WriteBytesLittleEndian(0, buffer.Slice(0x0C));
buffer.Slice(0x0C).Clear();
}

EndianUtilities.WriteBytesLittleEndian(pos, buffer.Slice(0x04));
Expand Down
2 changes: 1 addition & 1 deletion Library/DiscUtils.SquashFs/FragmentRecord.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ public void WriteTo(Span<byte> buffer)
{
EndianUtilities.WriteBytesLittleEndian(StartBlock, buffer);
EndianUtilities.WriteBytesLittleEndian(CompressedSize, buffer.Slice(8));
EndianUtilities.WriteBytesLittleEndian(0, buffer.Slice(12));
buffer.Slice(12).Clear();
}
}

0 comments on commit 8aba74b

Please sign in to comment.