ikalou.
List, Collection Initializer and Capacity
Hi! Does creating a new List with new List<T> { new T() } (or any number of elements > 0) starts with the proper capacity in order to avoid resizes or does it start at 0 and then grows to add the elements and I should be using new List<T>(1) { new T() } (for instance) instead? Thanks for helping me figure this out!
54 replies
Compression with real time compressed size estimation
Hi all. Is there a something I can use to compress a stream of data while getting a good estimate of the compressed size as I feed data into it? I doesn't have to be state of the art. I was thinking of maybe using something very simple like LZW but there aren't many good libraries or resources for it as it's not very popular nowadays.
3 replies