This is what I wound up resorting to in this case.
string jobDirVar = [FilePath];
byte[] bytesToCompress = File.ReadAllBytes(jobDirVar);
byte[] decompressedBytes = new byte[bytesToCompress.Length];
using (FileStream fileToCompress = File.Create(FilePath))
{
using (GZipStream compressionStream = new GZipStream(fileToCompress, CompressionMode.Compress))
{
compressionStream.Write(bytesToCompress, 0, bytesToCompress.Length);
}
}
using (FileStream fileToDecompress = File.Open(FilePath, FileMode.Open))
{
using (GZipStream decompressionStream = new GZipStream(fileToDecompress, CompressionMode.Decompress))
{
decompressionStream.Read(decompressedBytes, 0, bytesToCompress.Length);
}
}
It's not the prettiest bit of coding, but it seems to have provided me with what I was after. If anyone else has anything that might streamline things a bit, I'd love to still hear it, though!