public static void term_to_binary(ref byte[] OutData,ref int OutStartIndex, Term term) { if (OutData.Length<IncDataSize) OutData= new byte[IncDataSize]; OutData[OutStartIndex] = (byte)131;//ErlangBinary; OutStartIndex++; OutData=term.term_to_binary(ref OutData, ref OutStartIndex); }
public static byte[] term_to_binary(Term term,bool trim) { byte[] Data = new byte[IncDataSize]; int Index = 1; Data[0] = (byte)131;//ErlangBinary; Data=term.term_to_binary(ref Data, ref Index); if (trim) { byte[] newData = new byte[Index + 1]; Array.Copy(Data, newData, newData.Length); return newData; } else return Data; }
public static byte[] term_to_binary(Term term) { byte [] Data=new byte[IncDataSize]; int Index=1; Data[0]=(byte)131;//ErlangBinary; return term.term_to_binary(ref Data,ref Index); }