Beispiel #1
0
        public byte[] DecodeMzx()
        {
            byte[] result = null;

            foreach (var sample in Samples)
            {
                var compressed = sample;
                using (var memoryStream = new MemoryStream(compressed))
                {
                    result = MzxYaz.Decode(memoryStream, compressed.Length);
                }
            }

            return(result);
        }
Beispiel #2
0
        public byte[] EncodeMzx()
        {
            byte[] result = null;

            foreach (var sample in Samples)
            {
                var compressed = sample;
                using (var memoryStream = new MemoryStream(compressed))
                {
                    result = MzxYaz.Decode(memoryStream, compressed.Length);
                }
                var length = MzxYaz.Encode(result, result.Length, out var encoded);
                // DebugUtil.Assert(sample.Length == length, "Encoded length is same as decoded length");
                result = encoded;
            }

            return(result);
        }