BinderTool.Program.GetDataExtension(System.IO.MemoryStream)

Here are the examples of the csharp api class BinderTool.Program.GetDataExtension(System.IO.MemoryStream) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

2 Examples 7

1. Example

Project: BinderTool
Source File: Program.cs
View license
private static void UnpackDcxFile(Options options)
        {
            string unpackedFileName = Path.GetFileNameWithoutExtension(options.InputPath);
            string outputFilePath = options.OutputPath;
            bool hasExtension = Path.GetExtension(unpackedFileName) != "";

            using (FileStream inputStream = new FileStream(options.InputPath, FileMode.Open, FileAccess.Read))
            {
                DcxFile dcxFile = DcxFile.Read(inputStream);
                byte[] decompressedData = dcxFile.Decompress();

                if (!hasExtension)
                {
                    string extension = GetDataExtension(new MemoryStream(decompressedData));
                    if (extension != ".dcx")
                    {
                        outputFilePath += extension;
                    }
                }

                File.WriteAllBytes(outputFilePath, decompressedData);
            }
        }

2. Example

Project: BinderTool
Source File: Program.cs
View license
private static void UnpackBdtFile(Options options)
        {
            FileNameDictionary dictiona/n ..... /n //View Source file for more details /n }