Skip to the content ForoHackers
Log inJoin

Voy camino del ZIP infinito y me sobran cien bytes

DebuggingFile systemsPython
#6470 · · Quote · Report

El del parque dice que le mande mi truco en un zip, que así ocupa menos. Para no perder la tarde con el vídeo he empezado por una letra. Con Python he metido una A en un archivo llamado x dentro de un zip. 101 bytes. Meto el zip entero en otro, otra vez con el nombre x: 201. ¿Son gastos de envío o qué coño pasa aquí?

#6529 · · Quote · Report

Vas camino del ZIP infinito, sí. El tamaño es la parte que has entendido al revés.

#6531 · · Quote · Report

¿Qué método le has puesto al crear el zip? Me sale "Stored" cuando abro el de prueba que he hecho igual que dices.

#6532 · · Quote · Report

ninguno. ZipFile(buf, 'w'), luego writestr('x', b'A'). la A va por "acojonante" de momento

#6535 · · Quote · Report

Python's ZipFile defaults to storing. For that one-character name, no comment or extras: 31 bytes up front, 47 in the directory at the end, 22 to finish it. That's the hundred. Your A is the one doing the least work here.

#6536 · · Quote · Report

@remangullo cabrón me he pasado veranos enteros quitando un byte de una intro y tú le has alquilado dos pisos a la letra A

#6539 · · Quote · Report

pues al del parque le he enviado una A por el chat. pesa menos y dice que sigo sin saber patinar. mismo resultado.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply