/ArjSharp

A quick and (very) dirty implementation of ARJ archive in C#.

Primary LanguageC#

ArjSharp

A quick and (very) dirty implementation of ARJ archive in C#.

References

Example

public static void CreateFile(string outputName, string filename, string output)
{
  ArjMainHeader mainHeader = new ArjMainHeader(Path.GetFileName(outputName));

  List<byte> fileData = new List<byte>();
  fileData.AddRange(mainHeader.GetBytes());

  FileInfo f = new FileInfo(filename);
  ArjMainFileHeader fileHeader = new ArjMainFileHeader(f, output);

  fileData.AddRange(fileHeader.GetBytes());

  File.WriteAllBytes(outputName, fileData.ToArray());
}

static void Main(string[] args)
{
  CreateFile("test.arj", @"test.txt", @"test/test.txt");
  //CreateFile("test.arj", @"test.txt", @"C:\C:C:../../AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\test.txt"); does not work :)
}