nrbf 0.2.2

A parser for the .NET Remoting Binary Format (NRBF).
Documentation
use nrbf::{RemotingMessage, Value};

#[test]
fn binary_array_rectangular() {
  #[rustfmt::skip]
  let input = [
    0,
      0x01, 0x00, 0x00, 0x00,
      0xFF, 0xFF, 0xFF, 0xFF,
      0x01, 0x00, 0x00, 0x00,
      0x00, 0x00, 0x00, 0x00,
    7,
      0x01, 0x00, 0x00, 0x00,
      2,
      0x02, 0x00, 0x00, 0x00,
      0x01, 0x00, 0x00, 0x00,
      0x02, 0x00, 0x00, 0x00,
      0,
      9,
      67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
      42, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
    11,
  ];

  let output = RemotingMessage::Value(Value::Array(vec![Value::Array(vec![Value::Int64(67), Value::Int64(42)])]));

  assert_eq!(RemotingMessage::parse(&input), Ok(output));
}