GitSharp.Core.UnpackedObjectLoader.ReadCompressed C# (CSharp) Method

ReadCompressed() private static method

private static ReadCompressed ( FileSystemInfo path ) : byte[]
path System.IO.FileSystemInfo
return byte[]
        private static byte[] ReadCompressed(FileSystemInfo path)
        {
            using (var inStream = new FileStream(path.FullName, System.IO.FileMode.Open, FileAccess.Read))
            {
                try
                {
                    var compressed = new byte[(int)inStream.Length];
                    IO.ReadFully(inStream, compressed, 0, compressed.Length);
                    return compressed;
                }
                finally
                {
                    inStream.Close();
                }
            }
        }