Mathematica snippets

(* long2bytes in mathematica*)
long2bytes[m_] := FromCharacterCode @ IntegerDigits[m,256];