Ejemplo n.º 1
0
        private void Button_Click_2(object sender, RoutedEventArgs e)
        {
            List <ImageWrapper> images = new List <ImageWrapper>();
            int i = 0;

            for (int offset = 0; offset < (file.Length - 1); offset++)
            {
                if (file[offset] == 'L' && file[offset + 1] == 'e')
                {
                    int size = Utils.GetIntAtPosition(file, offset + 2);
                    if (size > 0 && size < 0x8000)
                    {
                        //ArrayPtr arrayPtr = new ArrayPtr(file, offset);
                        byte[]       data   = Malias2.Decompress(file, offset);
                        ImageWrapper result = new ImageWrapper(i, offset, data, "Malias2");
                        images.Add(result);
                        i++;
                    }
                }
                else if (file[offset] == 0x10)
                {
                    int size = file[offset + 1] | file[offset + 2] << 8 | file[offset + 3] << 16;
                    if (size > 0 && size < 0x8000 && size % 0x20 == 0)
                    {
                        byte[] data = LZ77.Decompress(file, offset);
                        if (data != null)
                        {
                            ImageWrapper result = new ImageWrapper(i, offset, data, "LZ77");
                            images.Add(result);
                            i++;
                        }
                    }
                }
            }
            imagesList.ItemsSource = images;
        }
Ejemplo n.º 2
0
 public int[] ScanForMalias2CompressedData(int offset, int length, int maxSize, int minSize, int sizeMultible)
 {
     return(Malias2.Scan(ROMdata, offset, length, sizeMultible, minSize, maxSize));
 }
Ejemplo n.º 3
0
 public byte[] DecompressMalias2CompressedData(int offset)
 {
     return(Malias2.Decompress(ROMdata, offset));
 }