calculate len when a binary content is given (not its length