108ab4769SHemant Agrawal /* SPDX-License-Identifier: BSD-3-Clause 21692bc53SArtur Trybula * Copyright(c) 2018-2020 Intel Corporation 31692bc53SArtur Trybula */ 41692bc53SArtur Trybula 5a9de470cSBruce Richardson #ifndef TEST_COMPRESSDEV_TEST_BUFFERS_H_ 6a9de470cSBruce Richardson #define TEST_COMPRESSDEV_TEST_BUFFERS_H_ 7a9de470cSBruce Richardson 8a9de470cSBruce Richardson /* 9a9de470cSBruce Richardson * These test buffers are snippets obtained 10a9de470cSBruce Richardson * from the Canterbury and Calgary Corpus 11a9de470cSBruce Richardson * collection. 12a9de470cSBruce Richardson */ 13a9de470cSBruce Richardson 14a9de470cSBruce Richardson /* Snippet of Alice's Adventures in Wonderland */ 15a9de470cSBruce Richardson static const char test_buf_alice[] = 16a9de470cSBruce Richardson " Alice was beginning to get very tired of sitting by her sister\n" 17a9de470cSBruce Richardson "on the bank, and of having nothing to do: once or twice she had\n" 18a9de470cSBruce Richardson "peeped into the book her sister was reading, but it had no\n" 19a9de470cSBruce Richardson "pictures or conversations in it, `and what is the use of a book,'\n" 20a9de470cSBruce Richardson "thought Alice `without pictures or conversation?'\n\n" 21a9de470cSBruce Richardson " So she was considering in her own mind (as well as she could,\n" 22a9de470cSBruce Richardson "for the hot day made her feel very sleepy and stupid), whether\n" 23a9de470cSBruce Richardson "the pleasure of making a daisy-chain would be worth the trouble\n" 24a9de470cSBruce Richardson "of getting up and picking the daisies, when suddenly a White\n" 25a9de470cSBruce Richardson "Rabbit with pink eyes ran close by her.\n\n" 26a9de470cSBruce Richardson " There was nothing so VERY remarkable in that; nor did Alice\n" 27a9de470cSBruce Richardson "think it so VERY much out of the way to hear the Rabbit say to\n" 28a9de470cSBruce Richardson "itself, `Oh dear! Oh dear! I shall be late!' (when she thought\n" 29a9de470cSBruce Richardson "it over afterwards, it occurred to her that she ought to have\n" 30a9de470cSBruce Richardson "wondered at this, but at the time it all seemed quite natural);\n" 31a9de470cSBruce Richardson "but when the Rabbit actually TOOK A WATCH OUT OF ITS WAISTCOAT-\n" 32a9de470cSBruce Richardson "POCKET, and looked at it, and then hurried on, Alice started to\n" 33a9de470cSBruce Richardson "her feet, for it flashed across her mind that she had never\n" 34a9de470cSBruce Richardson "before seen a rabbit with either a waistcoat-pocket, or a watch to\n" 35a9de470cSBruce Richardson "take out of it, and burning with curiosity, she ran across the\n" 36a9de470cSBruce Richardson "field after it, and fortunately was just in time to see it pop\n" 37a9de470cSBruce Richardson "down a large rabbit-hole under the hedge.\n\n" 38a9de470cSBruce Richardson " In another moment down went Alice after it, never once\n" 39a9de470cSBruce Richardson "considering how in the world she was to get out again.\n\n" 40a9de470cSBruce Richardson " The rabbit-hole went straight on like a tunnel for some way,\n" 41a9de470cSBruce Richardson "and then dipped suddenly down, so suddenly that Alice had not a\n" 42a9de470cSBruce Richardson "moment to think about stopping herself before she found herself\n" 43a9de470cSBruce Richardson "falling down a very deep well.\n\n" 44a9de470cSBruce Richardson " Either the well was very deep, or she fell very slowly, for she\n" 45a9de470cSBruce Richardson "had plenty of time as she went down to look about her and to\n" 46a9de470cSBruce Richardson "wonder what was going to happen next. First, she tried to look\n" 47a9de470cSBruce Richardson "down and make out what she was coming to, but it was too dark to\n" 48a9de470cSBruce Richardson "see anything; then she looked at the sides of the well, and\n" 49a9de470cSBruce Richardson "noticed that they were filled with cupboards and book-shelves;\n" 50a9de470cSBruce Richardson "here and there she saw maps and pictures hung upon pegs. She\n" 51a9de470cSBruce Richardson "took down a jar from one of the shelves as she passed; it was\n" 52a9de470cSBruce Richardson "labelled `ORANGE MARMALADE', but to her great disappointment it\n" 53a9de470cSBruce Richardson "was empty: she did not like to drop the jar for fear of killing\n" 54a9de470cSBruce Richardson "somebody, so managed to put it into one of the cupboards as she\n" 55a9de470cSBruce Richardson "fell past it.\n\n" 56a9de470cSBruce Richardson " `Well!' thought Alice to herself, `after such a fall as this, I\n" 57a9de470cSBruce Richardson "shall think nothing of tumbling down stairs! How brave they'll\n" 58a9de470cSBruce Richardson "all think me at home! Why, I wouldn't say anything about it,\n" 59a9de470cSBruce Richardson "even if I fell off the top of the house!' (Which was very likely\n" 60a9de470cSBruce Richardson "true.)\n\n" 61a9de470cSBruce Richardson " Down, down, down. Would the fall NEVER come to an end! `I\n" 62a9de470cSBruce Richardson "wonder how many miles I've fallen by this time?' she said aloud.\n" 63a9de470cSBruce Richardson "`I must be getting somewhere near the centre of the earth. Let\n" 64a9de470cSBruce Richardson "me see: that would be four thousand miles down, I think--' (for,\n" 65a9de470cSBruce Richardson "you see, Alice had learnt several things of this sort in her\n" 66a9de470cSBruce Richardson "lessons in the schoolroom, and though this was not a VERY good\n" 67a9de470cSBruce Richardson "opportunity for showing off her knowledge, as there was no one to\n" 68a9de470cSBruce Richardson "listen to her, still it was good practice to say it over) `--yes,\n" 69a9de470cSBruce Richardson "that's about the right distance--but then I wonder what Latitude\n" 70a9de470cSBruce Richardson "or Longitude I've got to?' (Alice had no idea what Latitude was,\n" 71a9de470cSBruce Richardson "or Longitude either, but thought they were nice grand words to\n" 72a9de470cSBruce Richardson "say.)\n\n" 73a9de470cSBruce Richardson " Presently she began again. `I wonder if I shall fall right\n" 74a9de470cSBruce Richardson "THROUGH the earth! How funny it'll seem to come out among the\n" 75a9de470cSBruce Richardson "people that walk with their heads downward! The Antipathies, I\n" 76a9de470cSBruce Richardson "think--' (she was rather glad there WAS no one listening, this\n" 77a9de470cSBruce Richardson "time, as it didn't sound at all the right word) `--but I shall\n" 78a9de470cSBruce Richardson "have to ask them what the name of the country is, you know.\n" 79a9de470cSBruce Richardson "Please, Ma'am, is this New Zealand or Australia?' (and she tried\n" 80a9de470cSBruce Richardson "to curtsey as she spoke--fancy CURTSEYING as you're falling\n" 81a9de470cSBruce Richardson "through the air! Do you think you could manage it?) `And what\n" 82a9de470cSBruce Richardson "an ignorant little girl she'll think me for asking! No, it'll\n" 83a9de470cSBruce Richardson "never do to ask: perhaps I shall see it written up somewhere.'\n" 84a9de470cSBruce Richardson " Down, down, down. There was nothing else to do, so Alice soon\n" 85a9de470cSBruce Richardson "began talking again. `Dinah'll miss me very much to-night, I\n" 86a9de470cSBruce Richardson "should think!' (Dinah was the cat.) `I hope they'll remember\n" 87a9de470cSBruce Richardson "her saucer of milk at tea-time. Dinah my dear! I wish you were\n" 88a9de470cSBruce Richardson "down here with me! There are no mice in the air, I'm afraid, but\n" 89a9de470cSBruce Richardson "you might catch a bat, and that's very like a mouse, you know.\n" 90a9de470cSBruce Richardson "But do cats eat bats, I wonder?' And here Alice began to get\n" 91a9de470cSBruce Richardson "rather sleepy, and went on saying to herself, in a dreamy sort of\n" 92a9de470cSBruce Richardson "way, `Do cats eat bats? Do cats eat bats?' and sometimes, `Do\n" 93a9de470cSBruce Richardson "bats eat cats?' for, you see, as she couldn't answer either\n" 94a9de470cSBruce Richardson "question, it didn't much matter which way she put it. She felt\n" 95a9de470cSBruce Richardson "that she was dozing off, and had just begun to dream that she\n" 96a9de470cSBruce Richardson "was walking hand in hand with Dinah, and saying to her very\n" 97a9de470cSBruce Richardson "earnestly, `Now, Dinah, tell me the truth: did you ever eat a\n" 98a9de470cSBruce Richardson "bat?' when suddenly, thump! thump! down she came upon a heap of\n" 99a9de470cSBruce Richardson "sticks and dry leaves, and the fall was over.\n\n"; 100a9de470cSBruce Richardson 101a9de470cSBruce Richardson /* Snippet of Shakespeare play */ 102a9de470cSBruce Richardson static const char test_buf_shakespeare[] = 103a9de470cSBruce Richardson "CHARLES wrestler to Frederick.\n" 104a9de470cSBruce Richardson "\n" 105a9de470cSBruce Richardson "\n" 106a9de470cSBruce Richardson "OLIVER |\n" 107a9de470cSBruce Richardson " |\n" 108a9de470cSBruce Richardson "JAQUES (JAQUES DE BOYS:) | sons of Sir Rowland de Boys.\n" 109a9de470cSBruce Richardson " |\n" 110a9de470cSBruce Richardson "ORLANDO |\n" 111a9de470cSBruce Richardson "\n" 112a9de470cSBruce Richardson "\n" 113a9de470cSBruce Richardson "ADAM |\n" 114a9de470cSBruce Richardson " | servants to Oliver.\n" 115a9de470cSBruce Richardson "DENNIS |\n" 116a9de470cSBruce Richardson "\n" 117a9de470cSBruce Richardson "\n" 118a9de470cSBruce Richardson "TOUCHSTONE a clown.\n" 119a9de470cSBruce Richardson "\n" 120a9de470cSBruce Richardson "SIR OLIVER MARTEXT a vicar.\n" 121a9de470cSBruce Richardson "\n" 122a9de470cSBruce Richardson "\n" 123a9de470cSBruce Richardson "CORIN |\n" 124a9de470cSBruce Richardson " | shepherds.\n" 125a9de470cSBruce Richardson "SILVIUS |\n" 126a9de470cSBruce Richardson "\n" 127a9de470cSBruce Richardson "\n" 128a9de470cSBruce Richardson "WILLIAM a country fellow in love with Audrey.\n" 129a9de470cSBruce Richardson "\n" 130a9de470cSBruce Richardson " A person representing HYMEN. (HYMEN:)\n" 131a9de470cSBruce Richardson "\n" 132a9de470cSBruce Richardson "ROSALIND daughter to the banished duke.\n" 133a9de470cSBruce Richardson "\n" 134a9de470cSBruce Richardson "CELIA daughter to Frederick.\n" 135a9de470cSBruce Richardson "\n" 136a9de470cSBruce Richardson "PHEBE a shepherdess.\n" 137a9de470cSBruce Richardson "\n" 138a9de470cSBruce Richardson "AUDREY a country wench.\n" 139a9de470cSBruce Richardson "\n" 140a9de470cSBruce Richardson " Lords, pages, and attendants, &c.\n" 141a9de470cSBruce Richardson " (Forester:)\n" 142a9de470cSBruce Richardson " (A Lord:)\n" 143a9de470cSBruce Richardson " (First Lord:)\n" 144a9de470cSBruce Richardson " (Second Lord:)\n" 145a9de470cSBruce Richardson " (First Page:)\n" 146a9de470cSBruce Richardson " (Second Page:)\n" 147a9de470cSBruce Richardson "\n" 148a9de470cSBruce Richardson "\n" 149a9de470cSBruce Richardson "SCENE Oliver's house; Duke Frederick's court; and the\n" 150a9de470cSBruce Richardson " Forest of Arden.\n" 151a9de470cSBruce Richardson "\n" 152a9de470cSBruce Richardson "\n" 153a9de470cSBruce Richardson "\n" 154a9de470cSBruce Richardson "\n" 155a9de470cSBruce Richardson " AS YOU LIKE IT\n" 156a9de470cSBruce Richardson "\n" 157a9de470cSBruce Richardson "\n" 158a9de470cSBruce Richardson "ACT I\n" 159a9de470cSBruce Richardson "\n" 160a9de470cSBruce Richardson "\n" 161a9de470cSBruce Richardson "\n" 162a9de470cSBruce Richardson "SCENE I Orchard of Oliver's house.\n" 163a9de470cSBruce Richardson "\n" 164a9de470cSBruce Richardson "\n" 165a9de470cSBruce Richardson " [Enter ORLANDO and ADAM]\n" 166a9de470cSBruce Richardson "\n" 167a9de470cSBruce Richardson "ORLANDO As I remember, Adam, it was upon this fashion\n" 168a9de470cSBruce Richardson " bequeathed me by will but poor a thousand crowns,\n" 169a9de470cSBruce Richardson " and, as thou sayest, charged my brother, on his\n" 170a9de470cSBruce Richardson " blessing, to breed me well: and there begins my\n" 171a9de470cSBruce Richardson " sadness. My brother Jaques he keeps at school, and\n" 172a9de470cSBruce Richardson " report speaks goldenly of his profit: for my part,\n" 173a9de470cSBruce Richardson " he keeps me rustically at home, or, to speak more\n" 174a9de470cSBruce Richardson " properly, stays me here at home unkept; for call you\n" 175a9de470cSBruce Richardson " that keeping for a gentleman of my birth, that\n" 176a9de470cSBruce Richardson " differs not from the stalling of an ox? His horses\n" 177a9de470cSBruce Richardson " are bred better; for, besides that they are fair\n" 178a9de470cSBruce Richardson " with their feeding, they are taught their manage,\n" 179a9de470cSBruce Richardson " and to that end riders dearly hired: but I, his\n" 180a9de470cSBruce Richardson " brother, gain nothing under him but growth; for the\n" 181a9de470cSBruce Richardson " which his animals on his dunghills are as much\n" 182a9de470cSBruce Richardson " bound to him as I. Besides this nothing that he so\n" 183a9de470cSBruce Richardson " plentifully gives me, the something that nature gave\n" 184a9de470cSBruce Richardson " me his countenance seems to take from me: he lets\n" 185a9de470cSBruce Richardson " me feed with his hinds, bars me the place of a\n" 186a9de470cSBruce Richardson " brother, and, as much as in him lies, mines my\n" 187a9de470cSBruce Richardson " gentility with my education. This is it, Adam, that\n" 188a9de470cSBruce Richardson " grieves me; and the spirit of my father, which I\n" 189a9de470cSBruce Richardson " think is within me, begins to mutiny against this\n" 190a9de470cSBruce Richardson " servitude: I will no longer endure it, though yet I\n" 191a9de470cSBruce Richardson " know no wise remedy how to avoid it.\n" 192a9de470cSBruce Richardson "\n" 193*cb056611SStephen Hemminger "ADAM Yonder comes my main, your brother.\n" 194a9de470cSBruce Richardson "\n" 195a9de470cSBruce Richardson "ORLANDO Go apart, Adam, and thou shalt hear how he will\n"; 196a9de470cSBruce Richardson 1971692bc53SArtur Trybula /* Snippet of Alice's Adventures in Wonderland */ 1981692bc53SArtur Trybula static const char test_buf_alice2[] = 1991692bc53SArtur Trybula "`Curiouser and curiouser!' cried Alice (she was so much\n" 2001692bc53SArtur Trybula "surprised, that for the moment she quite forgot how to speak good\n" 2011692bc53SArtur Trybula "English); `now I'm opening out like the largest telescope that\n" 2021692bc53SArtur Trybula "ever was! Good-bye, feet!' (for when she looked down at her\n" 2031692bc53SArtur Trybula "feet, they seemed to be almost out of sight, they were getting so\n" 2041692bc53SArtur Trybula "far off). `Oh, my poor little feet, I wonder who will put on\n" 2051692bc53SArtur Trybula "your shoes and stockings for you now, dears? I'm sure _I_ shan't\n" 2061692bc53SArtur Trybula "be able! I shall be a great deal too far off to trouble myself\n" 2071692bc53SArtur Trybula "about you: you must manage the best way you can; --but I must be\n" 2081692bc53SArtur Trybula "kind to them,' thought Alice, `or perhaps they won't walk the\n" 2091692bc53SArtur Trybula "way I want to go! Let me see: I'll give them a new pair of\n" 2101692bc53SArtur Trybula "boots every Christmas.'\n" 211a9de470cSBruce Richardson "\n" 2121692bc53SArtur Trybula " And she went on planning to herself how she would manage it.\n" 2131692bc53SArtur Trybula "`They must go by the carrier,' she thought; `and how funny it'll\n" 2141692bc53SArtur Trybula "seem, sending presents to one's own feet! And how odd the\n" 2151692bc53SArtur Trybula "directions will look!\n" 216a9de470cSBruce Richardson "\n" 2171692bc53SArtur Trybula " ALICE'S RIGHT FOOT, ESQ.\n" 2181692bc53SArtur Trybula " HEARTHRUG,\n" 2191692bc53SArtur Trybula " NEAR THE FENDER,\n" 2201692bc53SArtur Trybula " (WITH ALICE'S LOVE).\n" 221a9de470cSBruce Richardson "\n" 2221692bc53SArtur Trybula "Oh dear, what nonsense I'm talking!'\n" 223a9de470cSBruce Richardson "\n" 2241692bc53SArtur Trybula " Just then her head struck against the roof of the hall: in\n" 2251692bc53SArtur Trybula "fact she was now more than nine feet high, and she at once took\n" 2261692bc53SArtur Trybula "up the little golden key and hurried off to the garden door.\n" 227a9de470cSBruce Richardson "\n" 2281692bc53SArtur Trybula " Poor Alice! It was as much as she could do, lying down on one\n" 2291692bc53SArtur Trybula "side, to look through into the garden with one eye; but to get\n" 2301692bc53SArtur Trybula "through was more hopeless than ever: she sat down and began to\n" 2311692bc53SArtur Trybula "cry again.\n" 232a9de470cSBruce Richardson "\n" 2331692bc53SArtur Trybula " `You ought to be ashamed of yourself,' said Alice, `a great\n" 2341692bc53SArtur Trybula "girl like you,' (she might well say this), `to go on crying in\n" 2351692bc53SArtur Trybula "this way! Stop this moment, I tell you!' But she went on all\n" 2361692bc53SArtur Trybula "the same, shedding gallons of tears, until there was a large pool\n" 2371692bc53SArtur Trybula "all round her, about four inches deep and reaching half down the\n" 2381692bc53SArtur Trybula "hall.\n" 2391692bc53SArtur Trybula "\n" 2401692bc53SArtur Trybula " After a time she heard a little pattering of feet in the\n" 2411692bc53SArtur Trybula "distance, and she hastily dried her eyes to see what was coming.\n" 2421692bc53SArtur Trybula "It was the White Rabbit returning, splendidly dressed, with a\n" 2431692bc53SArtur Trybula "pair of white kid gloves in one hand and a large fan in the\n" 2441692bc53SArtur Trybula "other: he came trotting along in a great hurry, muttering to\n" 2451692bc53SArtur Trybula "himself as he came, `Oh! the Duchess, the Duchess! Oh! won't she\n" 2461692bc53SArtur Trybula "be savage if I've kept her waiting!' Alice felt so desperate\n" 2471692bc53SArtur Trybula "that she was ready to ask help of any one; so, when the Rabbit\n" 2481692bc53SArtur Trybula "came near her, she began, in a low, timid voice, `If you please,\n" 2491692bc53SArtur Trybula "sir--' The Rabbit started violently, dropped the white kid\n" 2501692bc53SArtur Trybula "gloves and the fan, and skurried away into the darkness as hard\n" 2511692bc53SArtur Trybula "as he could go.\n" 2521692bc53SArtur Trybula "\n" 2531692bc53SArtur Trybula " Alice took up the fan and gloves, and, as the hall was very\n" 2541692bc53SArtur Trybula "hot, she kept fanning herself all the time she went on talking:\n" 2551692bc53SArtur Trybula "`Dear, dear! How queer everything is to-day! And yesterday\n" 2561692bc53SArtur Trybula "things went on just as usual. I wonder if I've been changed in\n" 2571692bc53SArtur Trybula "the night? Let me think: was I the same when I got up this\n" 2581692bc53SArtur Trybula "morning? I almost think I can remember feeling a little\n" 2591692bc53SArtur Trybula "different. But if I'm not the same, the next question is, Who in\n" 2601692bc53SArtur Trybula "the world am I? Ah, THAT'S the great puzzle!' And she began\n" 2611692bc53SArtur Trybula "thinking over all the children she knew that were of the same age\n" 2621692bc53SArtur Trybula "as herself, to see if she could have been changed for any of\n" 2631692bc53SArtur Trybula "them.\n" 2641692bc53SArtur Trybula "\n" 2651692bc53SArtur Trybula " `I'm sure I'm not Ada,' she said, `for her hair goes in such\n" 2661692bc53SArtur Trybula "long ringlets, and mine doesn't go in ringlets at all; and I'm\n" 2671692bc53SArtur Trybula "sure I can't be Mabel, for I know all sorts of things, and she,\n" 2681692bc53SArtur Trybula "oh! she knows such a very little! Besides, SHE'S she, and I'm I,\n" 2691692bc53SArtur Trybula "and--oh dear, how puzzling it all is! I'll try if I know all the\n" 2701692bc53SArtur Trybula "things I used to know. Let me see: four times five is twelve,\n" 2711692bc53SArtur Trybula "and four times six is thirteen, and four times seven is--oh dear!\n" 2721692bc53SArtur Trybula "I shall never get to twenty at that rate! However, the\n" 2731692bc53SArtur Trybula "Multiplication Table doesn't signify: let's try Geography.\n" 2741692bc53SArtur Trybula "London is the capital of Paris, and Paris is the capital of Rome,\n" 2751692bc53SArtur Trybula "and Rome--no, THAT'S all wrong, I'm certain! I must have been\n" 2761692bc53SArtur Trybula "changed for Mabel! I'll try and say ''How doth the little--''\n" 2771692bc53SArtur Trybula "and she crossed her hands on her lap as if she were saying lessons,\n" 2781692bc53SArtur Trybula "and began to repeat it, but her voice sounded hoarse and\n" 2791692bc53SArtur Trybula "strange, and the words did not come the same as they used to do:--\n" 2801692bc53SArtur Trybula "\n" 2811692bc53SArtur Trybula " `How doth the little crocodile\n" 2821692bc53SArtur Trybula " Improve his shining tail,\n" 2831692bc53SArtur Trybula " And pour the waters of the Nile\n" 2841692bc53SArtur Trybula " On every golden scale!\n" 2851692bc53SArtur Trybula "\n" 2861692bc53SArtur Trybula " `How cheerfully he seems to grin,\n" 2871692bc53SArtur Trybula " How neatly spread his claws,\n" 2881692bc53SArtur Trybula " And welcome little fishes in\n" 2891692bc53SArtur Trybula " With gently smiling jaws!'\n"; 290a9de470cSBruce Richardson 291a9de470cSBruce Richardson static const char * const compress_test_bufs[] = { 292a9de470cSBruce Richardson test_buf_alice, 293a9de470cSBruce Richardson test_buf_shakespeare, 2941692bc53SArtur Trybula test_buf_alice2 295a9de470cSBruce Richardson }; 296a9de470cSBruce Richardson 297a9de470cSBruce Richardson #endif /* TEST_COMPRESSDEV_TEST_BUFFERS_H_ */ 298