Shared code between Buffer extensions