This is the Last Will and Testament of Dobby, a free House Elf
I, Dobby, being of sound mind and body do hereby bequeth my entire collection to one Harry Potter; the most noble of Wizards, to whom Dobby is forever indebted.
With a flourish, the House Elf signed and dated the document, and sent it by owl to Winky, the executrix of his estate. He was the first house elf in known history to even have an estate, and he was quite pleased he had something to leave behind to the ones who mattered most to him.
Winky had finally started to come around and he trusted her with this most sacred of tasks. She also happened to be the only other free elf capable of doing what he asked (he certainly couldn't ask a Wizard to help one such as him)
It was all he had in the world but it was everything. Sometimes at night he would pull his collection out and run his long fingers over the different textures, look at the different colours and patterns. They were all so beautiful.
It was a week after the war ended that a box full of socks arrived at Harry Potter's doorstop.