-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* prefer
ByteArrayEqualityComparer
that using `Span<>.SequenceEqual…
…(ReadOnlySpan<>) over `IEnumerable<>.SequenceEqual(IEnumerable<>)` @ `BaseSaver.IsSameUser()` * implement custom equality methods to use `ByteArrayEqualityComparer` for prop `byte[] XxHash3` @ `ReplySaver.UniqueSignature` @ crawler + class `ByteArrayEqualityComparer` @ shared * rename `CommonEmbeddedMetadataXxHash3ToIgnore/ICC/*` to convert their filename from `ulong` to bytes in hex * update `MetadataConsumer.CommonEmbeddedMetadataXxHash3ToIgnore.Icc` @ appsettings.json * replace all `ulong` hash fields with `required byte[]` @ `Db.ImageHash` @ imagePipeline * replace all `ulong XxHash3` fields in entity classes with `required byte[]` @ c#
- Loading branch information
Showing
26 changed files
with
73 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
namespace tbm.Shared | ||
{ | ||
public class ByteArrayEqualityComparer : EqualityComparer<byte[]> | ||
{ | ||
public override bool Equals(byte[]? x, byte[]? y) => | ||
x == y || (x != null && y != null && x.AsSpan().SequenceEqual(y.AsSpan())); | ||
|
||
public override int GetHashCode(byte[] obj) | ||
{ | ||
var hash = default(HashCode); | ||
hash.AddBytes(obj); | ||
return hash.ToHashCode(); | ||
} | ||
} | ||
} |