mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 16:47:22 +01:00
add CharacterAnalzyer, fix DtrEntry (I think)
This commit is contained in:
parent
2473087da4
commit
417c08f9b2
7 changed files with 170 additions and 29 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using MareSynchronos.Interop;
|
||||
using LZ4;
|
||||
using MareSynchronos.Interop;
|
||||
using MareSynchronos.MareConfiguration;
|
||||
using MareSynchronos.Utils;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
|
@ -137,6 +138,13 @@ public sealed class FileCacheManager : IDisposable
|
|||
return validatedCacheEntry;
|
||||
}
|
||||
|
||||
public async Task<(string, byte[])> GetCompressedFileData(string fileHash, CancellationToken uploadToken)
|
||||
{
|
||||
var fileCache = GetFileCacheByHash(fileHash)!.ResolvedFilepath;
|
||||
return (fileHash, LZ4Codec.WrapHC(await File.ReadAllBytesAsync(fileCache, uploadToken).ConfigureAwait(false), 0,
|
||||
(int)new FileInfo(fileCache).Length));
|
||||
}
|
||||
|
||||
public void RemoveHashedFile(FileCacheEntity? fileCache)
|
||||
{
|
||||
if (fileCache == null) return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue