fixed wrap-around and expansions support for circularbuffers
added expanding and direct byte access to circularbuffers