bug fix; performance improvements

- move SZMAPI_ definitions to global context so they aren't evaluated
  every call
- inline bytes_to_int in one place for 10x performance improvement
- fix typo: strLen->iddLen