Amiga.FileFormats.LHA
0.3.0
See the version list below for details.
dotnet add package Amiga.FileFormats.LHA --version 0.3.0
NuGet\Install-Package Amiga.FileFormats.LHA -Version 0.3.0
<PackageReference Include="Amiga.FileFormats.LHA" Version="0.3.0" />
paket add Amiga.FileFormats.LHA --version 0.3.0
#r "nuget: Amiga.FileFormats.LHA, 0.3.0"
// Install Amiga.FileFormats.LHA as a Cake Addin #addin nuget:?package=Amiga.FileFormats.LHA&version=0.3.0 // Install Amiga.FileFormats.LHA as a Cake Tool #tool nuget:?package=Amiga.FileFormats.LHA&version=0.3.0
Amiga LHA File Format
This package allows reading and writing LHA archives.
Reading supports the following compression methods:
- -lh0- (uncompressed)
- -lh5-
- -lh6-
- -lh7-
- -lz5-
- -lhd- (directory)
Writing supports all of the above except for -lz5-.
Requirements
This is all written in pure C#, so there are no dependencies beside .NET.
Virtual File System
The ILHA
interface implements a virtual file system interface IVirtualFileSystem
which allows
access to files (IFile
) and directories (IDirectory
) in a tree hierarchy.
Usage
Reading an archive.
var archive = LHAReader.LoadLHAFile("myArchive.lha");
var rootDir = archive.RootDirectory;
var myFile = rootDir.GetFile("internalFile.txt");
Console.WriteLine($"File Size: {myFile.Size}");
var myFileData = myFile.Data;
Writing an archive.
var result = LHAWriter.WriteLHAFile("myNewArchive.lha", archive, CompressionMethod.LH5);
if (result == LHAWriteResult.Success)
{
Console.WriteLine("It worked!");
}
Packing a directory of text files.
var result = LHAWriter.WriteLHAFile("myNewArchive.lha", "dirToMyFiles", "*.txt", CompressionMethod.LH5);
if (result == LHAWriteResult.Success)
{
Console.WriteLine("It worked!");
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Amiga.FileFormats.Core (>= 1.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Use with caution. This is still in beta phase and not all features/operations are supported.