drunkcod/DataBoss

Being able save zip to a stream

olovericson opened this issue · 1 comments

It would be awesome if it was possible to save a package as zip to a stream to avoid having to do this dance:
public void SaveTo(Stream stream) {
var fileName = Path.GetTempFileName();
dataPackage.SaveZip(fileName, CultureInfo.InvariantCulture);

        using (var fileStream = File.OpenRead(fileName)) {
            fileStream.CopyTo(stream);
        }
        
        File.Delete(fileName);

}

Fixed and will ship as part of .73.