-puts -nonewline $sock "d"
-if {[info exists ext]} {
- set ext [string trimleft $ext .]
- puts -nonewline $sock [string cat "1:e" [string length $ext] ":$ext"]
-}
-puts -nonewline $sock "1:v$size:"
+
+puts -nonewline $sock [string cat [string length $ext] ":$ext,"]
+puts -nonewline $sock "$size:"