def read_chunked(dest, chunk_data_io) # :nodoc:
    len = nil
    total = 0
    while true
      line = @socket.readline
      hexlen = line.slice(/[0-9a-fA-F]+/) or
          raise Net::HTTPBadResponse, "wrong chunk size line: #{line}"
      len = hexlen.hex
      break if len == 0
      begin
        chunk_data_io.read len, dest
      ensure
        total += len
        @socket.read 2   # \r\n
      end
    end
    until @socket.readline.empty?
      # none
    end
  end
#
read_chunked reads from +@socket+ for chunk-size, chunk-extension, CRLF,
etc. and +chunk_data_io+ for chunk-data which may be deflate or gzip
encoded.

See RFC 2616 section 3.6.1 for definitions