TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

HTTP/1.1 pipelining example: retrieving 100s of small files

2 pointsby textmodealmost 4 years ago
A simple demonstration of HTTP&#x2F;1.1 pipelining with netcat.<p>Retrieving 100s of small JPEG files with a single TCP connection. Here, 2 TCP connections for 141 files.<p>Splitting the output into image files and making a PDF from the images.<p>yy025 can be found here:<p>https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27178484<p>https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27180125<p>yy056 can be found here:<p>https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=27769305<p><pre><code> # std utils: split, seq, od, tr, sed, flex # common utils: nc, xxd, imagemagick # simple utils made with flex: yy025, yy056 (export Connection=keep-alive x1=http:&#x2F;&#x2F;www.minimizedistraction.com&#x2F;img&#x2F;vrg_google_doc_final_vrs03- x2(){ seq -f &quot;$x1%g.jpg&quot; $1 $2;}; x3(){ yy025|nc -vvn 173.236.175.199 80;}; x2 1 100|x3; x2 101 200|x3; )|exec yy056|exec od -An -tx1 -vw99999|exec tr -d &#x27;\40&#x27;|exec sed &#x27;s&#x2F;ffd9ffd8&#x2F;ffd9\ ffd8&#x2F;g&#x27;|exec sed -n &#x2F;ffd8&#x2F;p|exec split -l1; for x in x??;do xxd -p -r &lt; $x &gt; $x.jpg;rm $x;done; convert x??.jpg 1.pdf 2&gt;&#x2F;dev&#x2F;null;rm x??.jpg firefox .&#x2F;1.pdf </code></pre> Note: The 82nd image is apparently corrupted which you will notice on page 82 of the PDF. However, this has no effect on readability of the slide.

no comments

no comments