I have several old addresses that I have previously used for faucets (or in the case of my first address, for mining as well). I would like to sweep the funds from those addresses into a new address.
Is there some way to get or estimate the transaction size prior to initiating the transaction? These addresses have lots of small deposits, so I would like to transfer them to one address whilst minimizing the fees. I mean, I would rather donate them to, say, maybe /r/bitcoin, instead of lose most of the funds to transaction fees.
If it helps, here are the current Balances and Number of Transactions for the addresses:
0.00017593 (16)
0.00243568 (361)
0.00799525 (101)
0.00972206 (264)
It will really depend on the age of the coins and your ability to access a single larger output.
With some technical skills you (or some technical person you trust) can package together the outputs in groupings that are less than 10 kilobytes. The problem you'll have is that the priority won't be high enough due to the excessively low value of the inputs. If you could package them together with a single larger output, you could raise the priority of the entire transaction, and avoid the mandatory fee.
As an example, lets assume that the 0.00017593 is evenly split between the 16 outputs and that they are all the same age.
That means each output would be about 0.00001099, so the priority would be:
(16 * 1,099 * age) ) / 2,920
To get a priority of 57,600,000 and avoid the mandatory fee, the coins would have to have been first confirmed:
(57,600,000 * 2,920) / (16 * 1,099) = 9,565,059 blocks ago (that's 66,424 days!)
Now if you could receive a transaction for 5 BTC and include it in your transaction the priority would be:
(500,000,000 * newcoinAge + 16 * 1,099 * oldcoinAge) / 3,100
To get a priority of 57,600,000 and avoid the mandatory fee, you could ignore the age of the "dust" and the new 5 BTC output would have to have been first confirmed:
(57,600,000 * 3100) / 500,000,000 = 357 blocks ago.
Since transactions get approximately 144 confirmations per day, this would imply that with access to a single 5 BTC output, you could consolidate the 16 bitcoins valued at 0.00001099 BTC each after just 2 and a half days.
Access to a larger single output results in a shorter wait, and/or more "dust" outputs consolidated at once.
You can probably fit about 50 outputs into a transaction before you start running into issues exceeding 10 kilobytes.
A transaction just under 10 kilobytes could be sent with no fee after a 5.71428572 BTC output ages for a week (1008 blocks).
So, get access to a 5.71428572 BTC output, consolidate 50 "dust" outputs every week. By the end of 15 weeks you'll have consolidated it all into a single 5.73461464 BTC output.
If you are willing to draw the process out over 15 months instead of 15 weeks, you could send a transaction that is a bit less than 10 kilobytes every 30 days if you had access to a single output of 1.33333334 BTC.