java: public ObjectStream openStream() throws MissingObjectException, IOException {PackInputStream packIn;@SuppressWarnings("resource")DfsReader ctx = db.newReader();try {try {packIn = new PackInputStream(pack, objectOffset + headerLength, ctx);ctx = null; } catch (IOException packGone) {ObjectId obj = pack.getReverseIdx(ctx).findObject(objectOffset);return ctx.open(obj, type).openStream();}} finally {if (ctx != null) {ctx.close();}}int bufsz = 8192;InputStream in = new BufferedInputStream(new InflaterInputStream(packIn, packIn.ctx.inflater(), bufsz),bufsz);return new ObjectStream.Filter(type, size, in);}
C#: public override ObjectStream OpenStream(){WindowCursor wc = new WindowCursor(db);InputStream @in;try{@in = new PackInputStream(pack, objectOffset + headerLength, wc);}catch (IOException){return wc.Open(GetObjectId(), type).OpenStream();}@in = new BufferedInputStream(new InflaterInputStream(@in, wc.Inflater(), 8192),8192);return new ObjectStream.Filter(type, size, @in);}