About 10,000 ancient texts survive, which would require around 4-8 m2 of floor space stacked 1.8m high. The texts would be primarily from the Roman and Greek periods.
According to Gerstinger (1948) p.10, about 2000 Greek authors were known by name before the discovery of papyri. But the complete works of only 136 (6.8%) and fragments of another 127 (6.3%) were preserved. Gerstinger counted, however, only authors whose names were known, not works known by their titles...
In the first volume of the Ioannis Kakrides edited “Greek Mythology” (a 5 volume compilation in Greek of all known Greek myths) he has some 10 pages where he gives names of writers and titles of ancient mythlogical works and a summary of each work’s content if we have some idea what it is. When I originammy read it I did not feel the need to take notes but from what I remember it is far below 1% what has survived from that list. My guess would be around 0.3 to 0.4% of that list has actually survived.
This is commonly cited as "1% of ancient texts have survived."
Components (1)-(4) have already been completed, and have thus far led to the publication of more than 80 concordances in print (Figure 1a-b) and more than 60 titles on electronic media (Figure 2). There are 103 titles (over 9,000,000 Chinese characters) in the Pre-Han and Han database, over 1000 titles (over 21,000,000 Chinese characters) in the Weijin database, nine titles (over 300,000 Chinese characters) in the Jianbo database (Figure 3a-b) and over 1,000,000 Chinese characters in the Jiaguwen database. Parts of the above databases have been released on the CHANT Web site since 1998 and it is estimated the whole CHANT database, with search functions, will be available in September 2002.
The Siku Quanshu comprised 79,000 chapters in 36,000 volumes and was produced in seven manuscript copies between 1773 and 1782 (by more than 3,800 copyists); of these, one copy survived intact in the Forbidden City, from which the work was photolithographically reprinted in the 1980s and is now available online. At 800 million words it has been only recently surpassed by the English Wikipedia (over 1 billion words as of June 2010), but in the eighteenth century it far surpassed the 40 million words in the fifteenth edition of the Encyclopedia Britannica."
The editorial board included 361 scholars, with Ji Yun (紀昀) and Lu Xixiong (陸錫熊) as chief editors. They began compilation in 1773 and completed it in 1782. The editors collected and annotated over 10,000 manuscripts from the imperial collections and other libraries, destroyed some 3,000 titles, or works, that were considered to be anti-Manchu, and selected 3,461 titles, or works, for inclusion into the Siku quanshu. They were bound in 36,381 volumes (册) with more than 79,000 chapters (卷), comprising about 2.3 million pages, and approximately 800 million Chinese characters.
Of these, very few survived.
Recently, the Hong Kong Buddhist Education Foundation donated a Photofacsimile Reprint of the Wenyuan Pavilion Copy of the Siku Quanshu to Sun Yat-sen University Libraries. Based on the Wenyuan Pavilion Copy of the Siku Quanshu kept in the National Palace Museum in Taipei, it is reprinted by The Commercial Press (Taiwan) LTD. in sextodecimo format where four pages are compacted into one. The collection is made up of 1,500 volumes and worth nearly 500,000 yuan.
A comprehensive index of Latin literature before 600:
In spring 2001 the TLG-team developed its own search engine and made the corpus available online. Today the Online TLG contains more than 110 million words from over 10,000 works associated with 4,000 authors and is constantly updated and improved with new features and texts.
So let's tentatively estimate 10,000 surviving works from the Library of Constantinople and other European sources plus elsewhere, and see if this makes sense. Since less than 2,000 Chinese works likely survived, let's just focus on the European corpus.
Ancient Rome had roughly 100 million people, of which roughly 10% were literate.
Countries the size of the literate population of the Roman empire publish at least 10,000 books a year. Given the explosion of low-quality ebooks, its probably safe to halve this number. Over 500 years, the demographic peak of the Roman civilization, this would come out to 2.5 million works. If 0.4% of these survived, it would accord with the 10,000 estimate. It is below the 1% survival rate cited above, but within an order of magnitude.
The principal strengths of the Near Eastern manuscript collection are in Arabic language, grammar, and linguistics, in Islamic law, and in Islamic history, but the collection is comprehensive and most areas of Arabic and Islamic culture are represented to some extent. The collection includes over five thousand manuscripts in Arabic, Persian, Turkish, Ethiopic, Urdu, Syriac, Armenian, Coptic, and Samaritan, and it is greatly augmented by the collection of the American Oriental Society, which is on deposit in the Beinecke Library.
Some of these civilizations had long ceased to function by the time of the first permanent European arrivals (ca. late 15th – early 16th centuries), and are known only through archaeological investigations or oral history from tribes today. Others were contemporary with this period, and are also known from historical accounts of the time. A few, such as the Olmec, Maya, Mixtec, and Nahua had their own written records. However, most Europeans of the time viewed such texts as heretical and burned most of them. Only a few documents were hidden and thus remain today, leaving modern historians with glimpses of ancient culture and knowledge.
Add in the other ancient civilizations for which little record survives and the original number could be even higher. But very few of these survived.
In all you would find around 10,000 books in such a library, nearly all of them written in Classical Greece or Rome and survivors of the Library of Constantinople, or preserved in a handful of Imperial Chinese collections.
As for the square meters question, that depends on how they are stored. Assuming each book is a typical 15x22x2 cm, you could fit about 8 high for a 1.8m shelf. Each book occupies 0.003 sq m floor space. All considered it comes out to only 4 sq m of books, with perhaps double that to account for shelf material and bookends.