Exemplo n.º 1
0
                internal string processUncompressedData()
                {
                    if (mode == 0x3e)
                    {
                        SCSUDecompressor scsuDecompressor = new SCSUDecompressor();
                        return(scsuDecompressor.Decompress(compressedString));
                    }

                    if (mode > 0x3f)
                    {
                        return("Text mode 0x" + mode.ToString("X") + " not implemented");
                    }

                    int index = 0;

                    if (!useUnicodeEncoding)
                    {
                        useUnicodeEncoding = mode > 0x00;
                    }

                    if (mode != 0x3f)
                    {
                        byte[] unicodeString = new byte[compressedString.Length * 2];

                        foreach (byte compressedByte in compressedString)
                        {
                            unicodeString[index]     = (byte)mode;
                            unicodeString[index + 1] = compressedByte;
                            index += 2;
                        }

                        return(Utils.GetUnicodeString(unicodeString, 0, unicodeString.Length));
                    }
                    else
                    {
                        return(Utils.GetUnicodeString(compressedString, 0, compressedString.Length));
                    }
                }
Exemplo n.º 2
0
                internal string processUncompressedData()
                {
                    if (mode == 0x3e)
                    {
                        SCSUDecompressor scsuDecompressor = new SCSUDecompressor();
                        return (scsuDecompressor.Decompress(compressedString));
                    }

                    if (mode > 0x3f)
                        return ("Text mode 0x" + mode.ToString("X") + " not implemented");

                    int index = 0;

                    if (!useUnicodeEncoding)
                        useUnicodeEncoding = mode > 0x00;

                    if (mode != 0x3f)
                    {
                        byte[] unicodeString = new byte[compressedString.Length * 2];

                        foreach (byte compressedByte in compressedString)
                        {
                            unicodeString[index] = (byte)mode;
                            unicodeString[index + 1] = compressedByte;
                            index += 2;
                        }

                        return (Utils.GetUnicodeString(unicodeString, 0, unicodeString.Length));
                    }
                    else
                        return (Utils.GetUnicodeString(compressedString, 0, compressedString.Length));
                }