Renamed square setting, made packing try to use smallest square size.

#changes
BufferUtils: add additional method signatures
Merge pull request #1252 from xoppa/master

BufferUtils: add additional method signatures
Merge remote-tracking branch 'upstream/master'