rewrite write_longlong (optimized for 64bits and smaller values)
Merge pull request #106 from znarf/rewrite_longlong

rewrite write_longlong