Tests?
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using fxl.codes.kisekae.data.Archives.LhHeaders;
|
||||
using fxl.codes.kisekae.data.Entities;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
@@ -8,29 +7,13 @@ public class LhCodecService(ILogger<LhCodecService> logger)
|
||||
{
|
||||
public async Task<Kisekae?> ReadArchive(Stream stream)
|
||||
{
|
||||
try
|
||||
{
|
||||
var header = new LhHeader(in stream);
|
||||
switch (header.MethodId)
|
||||
{
|
||||
case "-lh0-": break;
|
||||
case "-lzs-": break;
|
||||
case "-lz4-": break;
|
||||
case "-lh1-": break;
|
||||
case "-lh2-": break;
|
||||
case "-lh3-": break;
|
||||
case "-lh4-": break;
|
||||
case "-lh5-": break;
|
||||
case "-lh6-": break;
|
||||
case "-lh7-": break;
|
||||
default: throw new Exception("Unknown method");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
logger.LogError(e, "Unable to open archive");
|
||||
}
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
return null;
|
||||
internal static IEnumerable<LhContainer> GetFiles(ref readonly Stream stream)
|
||||
{
|
||||
var files = new List<LhContainer>();
|
||||
while (stream.Position + 21 < stream.Length) files.Add(new LhContainer(in stream));
|
||||
return files;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user