Skip to content

Instantly share code, notes, and snippets.

public static class FileComparer
{
public static bool CompareEquals(string filePath1, string filePath2, int bufferSize = 65536)
{
if (filePath1 == filePath2) return true;
var buffer1 = ArrayPool<byte>.Shared.Rent(bufferSize);
var buffer2 = ArrayPool<byte>.Shared.Rent(bufferSize);
try
{
@filzrev
filzrev / README.md
Last active September 14, 2023 12:45
Custom docfx template to replace search library from `lunr.js` to `fuse.js`

Summary

This script is used to replace docfx's lunr.js search to fuse.js based search. To use this script. simply replace public/search-worker.min.js with this gist content.

Note

This script works only when using modern template. To support default template. it needs to replace import Fuse from statement with equivalent code that don't use ESM.