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); }
public byte[] EncodeMzx() { var length = MzxYaz.Encode(CodeBytes, CodeBytes.Length, out var encoded); return(encoded); }