rename 'length' parameters in the API to 'bytes', to make their unit clear