using System;
using System.Collections.Generic;
using System.IO;
using SabreTools.Library.DatItems;
namespace SabreTools.Library.FileTypes
{
///
/// Represents a ZstdArchive archive for reading and writing
///
/// TODO: Implement from source at https://github.com/skbkontur/ZstdNet
public class ZstdArchive : BaseArchive
{
#region Constructors
///
/// Create a new ZstdArchive with no base file
///
public ZstdArchive()
: base()
{
this.Type = FileType.ZstdArchive;
}
///
/// Create a new ZstdArchive from the given file
///
/// Name of the file to use as an archive
/// True if hashes for this file should be calculated, false otherwise (default)
public ZstdArchive(string filename, bool getHashes)
: base(filename, getHashes)
{
this.Type = FileType.ZstdArchive;
}
#endregion
#region Extraction
///
/// Attempt to extract a file as an archive
///
/// Output directory for archive extraction
/// True if the extraction was a success, false otherwise
public override bool CopyAll(string outDir)
{
throw new NotImplementedException();
}
///
/// Attempt to extract a file from an archive
///
/// Name of the entry to be extracted
/// Output directory for archive extraction
/// Name of the extracted file, null on error
public override string CopyToFile(string entryName, string outDir)
{
throw new NotImplementedException();
}
///
/// Attempt to extract a stream from an archive
///
/// Name of the entry to be extracted
/// Output representing the entry name that was found
/// MemoryStream representing the entry, null on error
public override (MemoryStream, string) CopyToStream(string entryName)
{
throw new NotImplementedException();
}
#endregion
#region Information
///
/// Generate a list of DatItem objects from the header values in an archive
///
/// List of DatItem objects representing the found data
public override List GetChildren()
{
throw new NotImplementedException();
}
///
/// Generate a list of empty folders in an archive
///
/// Input file to get data from
/// List of empty folders in the archive
public override List GetEmptyFolders()
{
throw new NotImplementedException();
}
///
/// Check whether the input file is a standardized format
///
public override bool IsTorrent()
{
throw new NotImplementedException();
}
#endregion
#region Writing
///
/// Write an input file to a torrent Zstd file
///
/// Input filename to be moved
/// Output directory to build to
/// DatItem representing the new information
/// True if the write was a success, false otherwise
/// This works for now, but it can be sped up by using Ionic.Zip or another zlib wrapper that allows for header values built-in. See edc's code.
public override bool Write(string inputFile, string outDir, Rom rom)
{
throw new NotImplementedException();
}
///
/// Write an input stream to a torrent Zstd file
///
/// Input stream to be moved
/// Output directory to build to
/// DatItem representing the new information
/// True if the write was a success, false otherwise
/// This works for now, but it can be sped up by using Ionic.Zip or another zlib wrapper that allows for header values built-in. See edc's code.
public override bool Write(Stream inputStream, string outDir, Rom rom)
{
throw new NotImplementedException();
}
///
/// Write a set of input files to a torrent Zstd archive (assuming the same output archive name)
///
/// Input files to be moved
/// Output directory to build to
/// DatItem representing the new information
/// True if the archive was written properly, false otherwise
public override bool Write(List inputFiles, string outDir, List roms)
{
throw new NotImplementedException();
}
#endregion
}
}