Even though it’s looking increasingly likely that humanity will find a way to wipe itself off the face of the Earth, there’s a chance that our creative output may live on.

Servers, hard drives, flash drives, and disks will degrade (as will our libraries of paper books, of course), but a group of researchers at the Swiss Federal Institute of Technology have found a way to encode data onto DNA—the very same stuff that all living beings’ genetic information is stored on—that could survive for millennia.

One gram of DNA can potentially hold up to 455 exabytes of data, according to the New Scientist. For reference: There are one billion gigabytes in an exabyte, and 1,000 exabytes in a zettabyte. The cloud computing company EMC estimated that there were 1.8 zettabytes of data in the world in 2011, which means we would need only about 4 grams (about a teaspoon) of DNA to hold everything from Plato through the complete works of Shakespeare to Beyonce’s latest album (not to mention every brunch photo ever posted on Instagram).

There are four types of molecules that make up DNA, which form pairs. To encode information on DNA, scientists program the pairs into 1s and os—the same binary language that encodes digital data. This is not a new concept—scientists at Harvard University encoded a book onto DNA in 2012—but up to now, it had been difficult to retrieve the information stored on the DNA.

Past tests have seen gaps in retrieved information, as DNA reacts with its environment and degrades at room temperature. Robert Grass, the leader of the project at the Federal Institute, has found a new way to preserve the information: treat it like a fossil. His team encased their DNA sample in a shell made from silica—similar in structure to fossilized bones and one of the main components of glass—and stored the sample at about 140°F for a few weeks to test its durability.

When researchers recovered the sample, they were still able to read the encoded data, and Grass told the Institute’s blog that had the DNA been stored at subzero temperatures, it could potentially be read in over a million years. CDs and DVDs only have shelf lives of about 25 years, according to the US National Archives, so this would be quite an improvement on our current data storage techniques.

For now, the process remains expensive. The DNA sample created for the Institute’s test—the Swiss federal charter and the Archimedes Palimpsest—was about 83 kilobytes of data and cost £1,000 ($1,500) to produce, Grass told the New Scientist. That means encoding anything worth saving—Wikipedia, for example, or the first four seasons of The Wire—would be prohibitively expensive right now.

As with any new technology, the cost of DNA storage is likely to drop as it advances. So there may come a time when a future being venturing out into the nuclear winter finds a DNA data store and will be able to peruse the greatest achievements of humanity up until the turn of the 20th century.