Exemple #1
0
 /// <summary>
 /// Gets the file data from the archive using a generator
 /// </summary>
 /// <param name="generator">The generator</param>
 /// <param name="fileEntry">The file entry</param>
 /// <returns>The encoded file data</returns>
 public Stream GetFileData(IDisposable generator, object fileEntry) => generator.CastTo <IArchiveFileGenerator <PC_FileArchiveEntry> >().GetFileStream((PC_FileArchiveEntry)fileEntry);
 /// <summary>
 /// Gets the original encoded contents of the file from the stream
 /// </summary>
 /// <param name="archiveFileStream">The file stream for the archive</param>
 /// <param name="generator">The file generator</param>
 /// <returns>The contents of the file</returns>
 public byte[] GetEncodedFileBytes(Stream archiveFileStream, IDisposable generator)
 {
     // Get the bytes
     return(generator.CastTo <IArchiveFileGenerator <OpenSpaceCntFileEntry> >().GetBytes(FileEntry));
 }