Is There An Autoresize Feature?

As more applications get added in the taskbar, I noticed that the dock extends past the edges of the screen -- even if it is not used.

My question is, is there a possibility to add an autoresize feature? This feature is found in the real OS X dock: the icons get smaller or bigger depending on the number of applications put in or are activated.

#22571