Authentication-Results: mail-b.sr.ht; dkim=pass header.d=tuxpup.com header.i=geoff@tuxpup.com Received: from sender4-op-o11.zoho.com (sender4-op-o11.zoho.com [136.143.188.11]) by mail-b.sr.ht (Postfix) with ESMTPS id 34ACB11EE5E for <~skeeto/public-inbox@lists.sr.ht>; Sun, 2 Jan 2022 15:27:29 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1641137246; cv=none; d=zohomail.com; s=zohoarc; b=UYQ0OlpI00LPftMnIOxJHcxZTniBA4pS6tipjFwtDByCd2wxsA+eMGGPd33Q2qIqlEbmMFl8RsVL+8IY6a3dc1Q5XdaSj9Ru8YtTPdCHix2O5hrPXagOB9X4CBrNBtpyKuDRDpl+yNnK8nI/ug4qqwCfq+96eujMJ/MU6fklt7E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1641137246; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=Jg1IQA6brhIBatemyrb5DBOG0pLuPimjvmlBvrOcYeE=; b=gWivWmIL6X9D5Q01UWv7FekArsfy53ZR1hryk/deDS3VQf2C8uPY1jD44aq2mOB4bM1+cWceHpCRJwifVXj4ohVxN4bLzu2+LnVdcreOoJKqeAkF1H2rG66YgBafOITTB7tUMpOacD1/HTuGijdBZ6EEZz310qf2zpAGbU4QFdQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=tuxpup.com; spf=pass smtp.mailfrom=geoff@tuxpup.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1641137246; s=zoho; d=tuxpup.com; i=geoff@tuxpup.com; h=Message-ID:Date:MIME-Version:To:Subject:From:Content-Type:Content-Transfer-Encoding; bh=Jg1IQA6brhIBatemyrb5DBOG0pLuPimjvmlBvrOcYeE=; b=HjQvfYlL1sCuyP5TmrCQJdUMhgewXb/ry4o3w2G57LLQ3yiVPtRa8jmRqUeD1nDC ERBmAprxDtAdvUx9Cf2u8/c3G5aMHgkJxtvH9/UP7l7t/JJG9l1ss5hjvfTgNDnb07s Xwe2HwJzMsCVaF2pBaDTFmIesD4j5j676RgWjoeI= Received: from [192.168.4.49] (cpe-24-163-24-72.triad.res.rr.com [24.163.24.72]) by mx.zohomail.com with SMTPS id 1641137243725640.6508151906334; Sun, 2 Jan 2022 07:27:23 -0800 (PST) Message-ID: Date: Sun, 2 Jan 2022 10:27:21 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.4.1 To: ~skeeto/public-inbox@lists.sr.ht Subject: Re: A new protocol and tool for PNG file attachments Content-Language: en-US From: Geoff Beier Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ZohoMailClient: External I enjoyed this piece, and I've wanted a similar thing before. > I expect any experienced programmer could write a basic attachment extractor in their language of choice inside of 30 or so minutes. Hooking up a DEFLATE library for decompression would be the most difficult part. That held up well for me. Here's my 15ish minute attempt in python: https://git.sr.ht/~tuxpup/pypng-detach/tree/main/item/pypng_detach/cli.py Reading a null-terminated string to get the name feels a little contorted in python, but compression was very straightforward. Thanks for posting a fun experiment.