/* put a little endian long long (64bits) to a pointer 
Caller should ensure parameters are valid. */
void BytesPutLe64(void *ptr, uint64_t v)
/* put a little endian long long (64bits) to a pointer 
Caller should ensure parameters are valid. */
void BytesPutLe64(void *ptr, uint64_t v)
{
    uint8_t *p = (uint8_t *)ptr;
    BytesPutLe32(p, v & 0xffffffff);
    BytesPutLe32(p + 4, (v >> 32) & 0xffffffff);
}