2017-11-02 00:29:20 -07:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2020-06-11 11:44:46 -07:00
|
|
|
|
using System.IO;
|
2017-11-02 00:29:20 -07:00
|
|
|
|
|
2020-12-08 13:23:59 -08:00
|
|
|
|
using SabreTools.Core;
|
2017-11-02 00:29:20 -07:00
|
|
|
|
|
|
|
|
|
|
namespace SabreTools.Library.FileTypes
|
|
|
|
|
|
{
|
2019-02-08 20:51:44 -08:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Represents a ZstdArchive archive for reading and writing
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// TODO: Implement from source at https://github.com/skbkontur/ZstdNet
|
|
|
|
|
|
public class ZstdArchive : BaseArchive
|
|
|
|
|
|
{
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a new ZstdArchive with no base file
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public ZstdArchive()
|
|
|
|
|
|
: base()
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Type = FileType.ZstdArchive;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a new ZstdArchive from the given file
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="filename">Name of the file to use as an archive</param>
|
|
|
|
|
|
/// <param name="getHashes">True if hashes for this file should be calculated, false otherwise (default)</param>
|
|
|
|
|
|
public ZstdArchive(string filename, bool getHashes)
|
|
|
|
|
|
: base(filename, getHashes)
|
|
|
|
|
|
{
|
|
|
|
|
|
this.Type = FileType.ZstdArchive;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Extraction
|
|
|
|
|
|
|
2020-12-08 11:09:05 -08:00
|
|
|
|
/// <inheritdoc/>
|
2019-02-08 20:51:44 -08:00
|
|
|
|
public override bool CopyAll(string outDir)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-12-08 11:09:05 -08:00
|
|
|
|
/// <inheritdoc/>
|
2019-02-08 20:51:44 -08:00
|
|
|
|
public override string CopyToFile(string entryName, string outDir)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-12-08 11:09:05 -08:00
|
|
|
|
/// <inheritdoc/>
|
2019-02-08 20:51:44 -08:00
|
|
|
|
public override (MemoryStream, string) CopyToStream(string entryName)
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Information
|
|
|
|
|
|
|
2020-12-08 11:09:05 -08:00
|
|
|
|
/// <inheritdoc/>
|
2020-09-18 11:26:50 -07:00
|
|
|
|
public override List<BaseFile> GetChildren()
|
2019-02-08 20:51:44 -08:00
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-12-08 11:09:05 -08:00
|
|
|
|
/// <inheritdoc/>
|
2019-02-08 20:51:44 -08:00
|
|
|
|
public override List<string> GetEmptyFolders()
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-12-08 11:09:05 -08:00
|
|
|
|
/// <inheritdoc/>
|
2019-02-08 20:51:44 -08:00
|
|
|
|
public override bool IsTorrent()
|
|
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Writing
|
|
|
|
|
|
|
2020-12-08 11:09:05 -08:00
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
public override bool Write(string inputFile, string outDir, BaseFile baseFile)
|
2019-02-08 20:51:44 -08:00
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-12-08 11:09:05 -08:00
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
public override bool Write(Stream inputStream, string outDir, BaseFile baseFile)
|
2019-02-08 20:51:44 -08:00
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-12-08 11:09:05 -08:00
|
|
|
|
/// <inheritdoc/>
|
|
|
|
|
|
public override bool Write(List<string> inputFiles, string outDir, List<BaseFile> baseFiles)
|
2019-02-08 20:51:44 -08:00
|
|
|
|
{
|
|
|
|
|
|
throw new NotImplementedException();
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
}
|
2017-11-02 00:29:20 -07:00
|
|
|
|
}
|