Skip to content

Commit

Permalink
Added CustomDecoder interface
Browse files Browse the repository at this point in the history
  • Loading branch information
GreyCat committed Sep 6, 2017
1 parent fc2f9a4 commit bb266f3
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion KaitaiStruct.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,19 @@ public KaitaiStruct(KaitaiStream io)
m_io = io;
}
}
}

/// <summary>
/// A custom decoder interface. Implementing classes can be called from
/// inside a .ksy file using `process: XXX` syntax.
/// </summary>
public interface CustomDecoder
{
/// <summary>
/// Decodes a given byte array, according to some custom algorithm
/// (specific to implementing class) and parameters given in the
/// constructor, returning another byte array.
/// </summary>
/// <param name="src">Source byte array.</param>
byte[] Decode(byte[] src);
}
}

0 comments on commit bb266f3

Please sign in to comment.