//ulong bufferOffset = 0; //ulong bufferBytes = 0; public UnbakeForFuse(IMongoDatabase db, IMongoCollection <BakedAssets> bac, IMongoCollection <BakedVolumes> bVol, string assetId, bool assetDebug = false) { Debug = assetDebug; try { this.db = db; this.bakedAssets = bac; this.assetId = assetId; if (DoSum) { sha1Computer = System.Security.Cryptography.SHA1.Create(); sha1Computer2 = System.Security.Cryptography.SHA1.Create(); } if (Debug) { Console.WriteLine($"UnbakeForFuse::Construct Asset={assetId}"); } // We must wrap the file stream since we need the un-gzip to happen file = new AssetFile(assetId, db, bac); fileLength = file.baRec.FileLength; assetStream = file.CreateReadStream(); CurrentPosition = 0; bigBuffer = null; // Discard anything we have here //bufferBytes = 0; //bufferOffset = 0; } catch (Exception ex) { Console.WriteLine($"UnbakeForFuse::Construct {ex.Message} {ex.StackTrace}"); } }
public MakeStream(BakedAssets baRec, BakedVolumes volRec, AssetFile file) { this.baRec = baRec; this.volRec = volRec; fileCreator = file; }