Fix JavaDoc and Run Brotli tests on Windows (#11468)
Motivation: JavaDoc of StandardCompressionOptions should point towards public methods. Also, Brotli tests were failing on Windows. Modification: Fixed JavaDoc and enabled Brotli tests on Windows. Result: Better JavaDoc and Brotli tests will run on Windows Co-authored-by: Norman Maurer <norman_maurer@apple.com>
This commit is contained in:
parent
98c446c493
commit
7ec198ddf9
@ -33,6 +33,7 @@ import io.netty.util.ReferenceCountUtil;
|
|||||||
import io.netty.util.internal.PlatformDependent;
|
import io.netty.util.internal.PlatformDependent;
|
||||||
import org.apache.commons.io.IOUtils;
|
import org.apache.commons.io.IOUtils;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.condition.DisabledIf;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -63,16 +64,17 @@ public class HttpContentDecoderTest {
|
|||||||
|
|
||||||
static {
|
static {
|
||||||
InputStream uncompressed = HttpContentDecoderTest.class.getClassLoader()
|
InputStream uncompressed = HttpContentDecoderTest.class.getClassLoader()
|
||||||
.getResourceAsStream("sample.json");
|
.getResourceAsStream("sample-data.txt");
|
||||||
try {
|
try {
|
||||||
SAMPLE_STRING = IOUtils.toString(uncompressed, CharsetUtil.UTF_8);
|
assert uncompressed != null;
|
||||||
|
SAMPLE_STRING = new String(IOUtils.readFully(uncompressed, uncompressed.available()), CharsetUtil.UTF_8);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
throw new ExceptionInInitializerError(e);
|
throw new ExceptionInInitializerError(e);
|
||||||
} finally {
|
} finally {
|
||||||
IOUtils.closeQuietly(uncompressed, null);
|
IOUtils.closeQuietly(uncompressed, null);
|
||||||
}
|
}
|
||||||
InputStream compressed = HttpContentDecoderTest.class.getClassLoader()
|
InputStream compressed = HttpContentDecoderTest.class.getClassLoader()
|
||||||
.getResourceAsStream("sample.json.br");
|
.getResourceAsStream("sample-data.br");
|
||||||
try {
|
try {
|
||||||
SAMPLE_BZ_BYTES = IOUtils.toByteArray(compressed);
|
SAMPLE_BZ_BYTES = IOUtils.toByteArray(compressed);
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
@ -192,11 +194,11 @@ public class HttpContentDecoderTest {
|
|||||||
assertFalse(channel.finish()); // assert that no messages are left in channel
|
assertFalse(channel.finish()); // assert that no messages are left in channel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DisabledIf(value = "isNotSupported", disabledReason = "Brotli is not supported on this platform")
|
||||||
@Test
|
@Test
|
||||||
public void testResponseBrotliDecompression() throws Throwable {
|
public void testResponseBrotliDecompression() throws Throwable {
|
||||||
Brotli.ensureAvailability();
|
Brotli.ensureAvailability();
|
||||||
// Failing on windows atm
|
|
||||||
assumeFalse(PlatformDependent.isWindows());
|
|
||||||
HttpResponseDecoder decoder = new HttpResponseDecoder();
|
HttpResponseDecoder decoder = new HttpResponseDecoder();
|
||||||
HttpContentDecoder decompressor = new HttpContentDecompressor();
|
HttpContentDecoder decompressor = new HttpContentDecompressor();
|
||||||
HttpObjectAggregator aggregator = new HttpObjectAggregator(Integer.MAX_VALUE);
|
HttpObjectAggregator aggregator = new HttpObjectAggregator(Integer.MAX_VALUE);
|
||||||
@ -213,11 +215,8 @@ public class HttpContentDecoderTest {
|
|||||||
assertThat(o, is(instanceOf(FullHttpResponse.class)));
|
assertThat(o, is(instanceOf(FullHttpResponse.class)));
|
||||||
FullHttpResponse resp = (FullHttpResponse) o;
|
FullHttpResponse resp = (FullHttpResponse) o;
|
||||||
assertNull(resp.headers().get(HttpHeaderNames.CONTENT_ENCODING), "Content-Encoding header should be removed");
|
assertNull(resp.headers().get(HttpHeaderNames.CONTENT_ENCODING), "Content-Encoding header should be removed");
|
||||||
assertEquals(SAMPLE_STRING.length(),
|
|
||||||
resp.headers().getInt(HttpHeaderNames.CONTENT_LENGTH).intValue(),
|
|
||||||
"Content-Length header should match uncompressed string's length");
|
|
||||||
assertEquals(SAMPLE_STRING, resp.content().toString(CharsetUtil.UTF_8),
|
assertEquals(SAMPLE_STRING, resp.content().toString(CharsetUtil.UTF_8),
|
||||||
"Response body should match uncompressed string");
|
"Response body should match uncompressed string");
|
||||||
resp.release();
|
resp.release();
|
||||||
|
|
||||||
assertHasInboundMessages(channel, false);
|
assertHasInboundMessages(channel, false);
|
||||||
@ -225,11 +224,11 @@ public class HttpContentDecoderTest {
|
|||||||
assertFalse(channel.finish()); // assert that no messages are left in channel
|
assertFalse(channel.finish()); // assert that no messages are left in channel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@DisabledIf(value = "isNotSupported", disabledReason = "Brotli is not supported on this platform")
|
||||||
@Test
|
@Test
|
||||||
public void testResponseChunksBrotliDecompression() throws Throwable {
|
public void testResponseChunksBrotliDecompression() throws Throwable {
|
||||||
Brotli.ensureAvailability();
|
Brotli.ensureAvailability();
|
||||||
// Failing on windows atm
|
|
||||||
assumeFalse(PlatformDependent.isWindows());
|
|
||||||
HttpResponseDecoder decoder = new HttpResponseDecoder();
|
HttpResponseDecoder decoder = new HttpResponseDecoder();
|
||||||
HttpContentDecoder decompressor = new HttpContentDecompressor();
|
HttpContentDecoder decompressor = new HttpContentDecompressor();
|
||||||
HttpObjectAggregator aggregator = new HttpObjectAggregator(Integer.MAX_VALUE);
|
HttpObjectAggregator aggregator = new HttpObjectAggregator(Integer.MAX_VALUE);
|
||||||
@ -257,9 +256,6 @@ public class HttpContentDecoderTest {
|
|||||||
Object o = channel.readInbound();
|
Object o = channel.readInbound();
|
||||||
assertThat(o, is(instanceOf(FullHttpResponse.class)));
|
assertThat(o, is(instanceOf(FullHttpResponse.class)));
|
||||||
FullHttpResponse resp = (FullHttpResponse) o;
|
FullHttpResponse resp = (FullHttpResponse) o;
|
||||||
assertEquals(SAMPLE_STRING.length(),
|
|
||||||
resp.headers().getInt(HttpHeaderNames.CONTENT_LENGTH).intValue(),
|
|
||||||
"Content-Length header should match uncompressed string's length");
|
|
||||||
assertEquals(SAMPLE_STRING, resp.content().toString(CharsetUtil.UTF_8),
|
assertEquals(SAMPLE_STRING, resp.content().toString(CharsetUtil.UTF_8),
|
||||||
"Response body should match uncompressed string");
|
"Response body should match uncompressed string");
|
||||||
resp.release();
|
resp.release();
|
||||||
@ -860,4 +856,8 @@ public class HttpContentDecoderTest {
|
|||||||
assertNull(o);
|
assertNull(o);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static boolean isNotSupported() {
|
||||||
|
return PlatformDependent.isOsx() && "aarch_64".equals(PlatformDependent.normalizedArch());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
BIN
codec-http/src/test/resources/sample-data.br
Normal file
BIN
codec-http/src/test/resources/sample-data.br
Normal file
Binary file not shown.
100
codec-http/src/test/resources/sample-data.txt
Normal file
100
codec-http/src/test/resources/sample-data.txt
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
Eating raw fish didn't sound like a good idea. "It's a delicacy in Japan," didn't seem to make it any more appetizing. Raw fish is raw fish, delicacy or not.
|
||||||
|
Here's the thing. She doesn't have anything to prove, but she is going to anyway. That's just her character. She knows she doesn't have to, but she still will just to show you that she can. Doubt her more and she'll prove she can again. We all already know this and you will too.
|
||||||
|
It seemed like it should have been so simple. There was nothing inherently difficult with getting the project done. It was simple and straightforward enough that even a child should have been able to complete it on time, but that wasn't the case. The deadline had arrived and the project remained unfinished.
|
||||||
|
I'm going to hire professional help tomorrow. I can't handle this anymore. She fell over the coffee table and now there is blood in her catheter. This is much more than I ever signed up to do.
|
||||||
|
The amber droplet hung from the branch, reaching fullness and ready to drop. It waited. While many of the other droplets were satisfied to form as big as they could and release, this droplet had other plans. It wanted to be part of history. It wanted to be remembered long after all the other droplets had dissolved into history. So it waited for the perfect specimen to fly by to trap and capture that it hoped would eventually be discovered hundreds of years in the future.
|
||||||
|
Green vines attached to the trunk of the tree had wound themselves toward the top of the canopy. Ants used the vine as their private highway, avoiding all the creases and crags of the bark, to freely move at top speed from top to bottom or bottom to top depending on their current chore. At least this was the way it was supposed to be. Something had damaged the vine overnight halfway up the tree leaving a gap in the once pristine ant highway.
|
||||||
|
Do you think you're living an ordinary life? You are so mistaken it's difficult to even explain. The mere fact that you exist makes you extraordinary. The odds of you existing are less than winning the lottery, but here you are. Are you going to let this extraordinary opportunity pass?
|
||||||
|
Out of another, I get a lovely view of the bay and a little private wharf belonging to the estate. There is a beautiful shaded lane that runs down there from the house. I always fancy I see people walking in these numerous paths and arbors, but John has cautioned me not to give way to fancy in the least. He says that with my imaginative power and habit of story-making a nervous weakness like mine is sure to lead to all manner of excited fancies and that I ought to use my will and good sense to check the tendency. So I try.
|
||||||
|
He was aware there were numerous wonders of this world including the unexplained creations of humankind that showed the wonder of our ingenuity. There are huge heads on Easter Island. There are the Egyptian pyramids. There’s Stonehenge. But he now stood in front of a newly discovered monument that simply didn't make any sense and he wondered how he was ever going to be able to explain it.
|
||||||
|
The red glint of paint sparkled under the sun. He had dreamed of owning this car since he was ten, and that dream had become a reality less than a year ago. It was his baby and he spent hours caring for it, pampering it, and fondling over it. She knew this all too well, and that's exactly why she had taken a sludge hammer to it.
|
||||||
|
She didn't like the food. She never did. She made the usual complaints and started the tantrum he knew was coming. But this time was different. Instead of trying to placate her and her unreasonable demands, he just stared at her and watched her meltdown without saying a word.
|
||||||
|
She was in a hurry. Not the standard hurry when you're in a rush to get someplace, but a frantic hurry. The type of hurry where a few seconds could mean life or death. She raced down the road ignoring speed limits and weaving between cars. She was only a few minutes away when traffic came to a dead standstill on the road ahead.
|
||||||
|
"Begin today!" That's all the note said. There was no indication from where it came or who may have written it. Had it been meant for someone else? Meghan looked around the room, but nobody made eye contact back. For a brief moment, she thought it might be a message for her to follow her dreams, but ultimately decided it was easier to ignore it as she crumpled it up and threw it away.
|
||||||
|
According to the caption on the bronze marker placed by the Multnomah Chapter of the Daughters of the American Revolution on May 12, 1939, “College Hall (is) the oldest building in continuous use for Educational purposes west of the Rocky Mountains. Here were educated men and women who have won recognition throughout the world in all the learned professions.”
|
||||||
|
They rushed out the door, grabbing anything and everything they could think of they might need. There was no time to double-check to make sure they weren't leaving something important behind. Everything was thrown into the car and they sped off. Thirty minutes later they were safe and that was when it dawned on them that they had forgotten the most important thing of all.
|
||||||
|
He wondered if he should disclose the truth to his friends. It would be a risky move. Yes, the truth would make things a lot easier if they all stayed on the same page, but the truth might fracture the group leaving everything in even more of a mess than it was not telling the truth. It was time to decide which way to go.
|
||||||
|
It had become a far too common an event in her life. She has specifically placed the key to the box in a special place so that she wouldn't lose it and know exactly where it was when the key was needed. Now that she needed to open the box, she had absolutely no idea where that special spot she placed the key might be.
|
||||||
|
I guess we could discuss the implications of the phrase "meant to be." That is if we wanted to drown ourselves in a sea of backwardly referential semantics and other mumbo-jumbo. Maybe such a discussion would result in the determination that "meant to be" is exactly as meaningless a phrase as it seems to be, and that none of us is actually meant to be doing anything at all. But that's my existential underpants underpinnings showing. It's the way the cookie crumbles. And now I want a cookie.
|
||||||
|
Pink ponies and purple giraffes roamed the field. Cotton candy grew from the ground as a chocolate river meandered off to the side. What looked like stones in the pasture were actually rock candy. Everything in her dream seemed to be perfect except for the fact that she had no mouth.
|
||||||
|
She never liked cleaning the sink. It was beyond her comprehension how it got so dirty so quickly. It seemed that she was forced to clean it every other day. Even when she was extra careful to keep things clean and orderly, it still ended up looking like a mess in a couple of days. What she didn't know was there was a tiny creature living in it that didn't like things neat.
|
||||||
|
He couldn't move. His head throbbed and spun. He couldn't decide if it was the flu or the drinking last night. It was probably a combination of both.
|
||||||
|
Dave found joy in the daily routine of life. He awoke at the same time, ate the same breakfast and drove the same commute. He worked at a job that never seemed to change and he got home at 6 pm sharp every night. It was who he had been for the last ten years and he had no idea that was all about to change.
|
||||||
|
I recollect that my first exploit in squirrel-shooting was in a grove of tall walnut-trees that shades one side of the valley. I had wandered into it at noontime, when all nature is peculiarly quiet, and was startled by the roar of my own gun, as it broke the Sabbath stillness around and was prolonged and reverberated by the angry echoes.
|
||||||
|
His parents continued to question him. He didn't know what to say to them since they refused to believe the truth. He explained again and again, and they dismissed his explanation as a figment of his imagination. There was no way that grandpa, who had been dead for five years, could have told him where the treasure had been hidden. Of course, it didn't help that grandpa was roaring with laughter in the chair next to him as he tried to explain once again how he'd found it.
|
||||||
|
Cake or pie? I can tell a lot about you by which one you pick. It may seem silly, but cake people and pie people are really different. I know which one I hope you are, but that's not for me to decide. So, what is it? Cake or pie?
|
||||||
|
She tried not to judge him. His ratty clothes and unkempt hair made him look homeless. Was he really the next Einstein as she had been told? On the off chance it was true, she continued to try not to judge him.
|
||||||
|
It was a weird concept. Why would I really need to generate a random paragraph? Could I actually learn something from doing so? All these questions were running through her head as she pressed the generate button. To her surprise, she found what she least expected to see.
|
||||||
|
There wasn't a bird in the sky, but that was not what caught her attention. It was the clouds. The deep green that isn't the color of clouds, but came with these. She knew what was coming and she hoped she was prepared.
|
||||||
|
What was beyond the bend in the stream was unknown. Both were curious, but only one was brave enough to want to explore. That was the problem. There was always one that let fear rule her life.
|
||||||
|
Dave watched as the forest burned up on the hill, only a few miles from her house. The car had been hastily packed and Marta was inside trying to round up the last of the pets. Dave went through his mental list of the most important papers and documents that they couldn't leave behind. He scolded himself for not having prepared these better in advance and hoped that he had remembered everything that was needed. He continued to wait for Marta to appear with the pets, but she still was nowhere to be seen.
|
||||||
|
Was it enough? That was the question he kept asking himself. Was being satisfied enough? He looked around him at everyone yearning to just be satisfied in their daily life and he had reached that goal. He knew that he was satisfied and he also knew it wasn't going to be enough.
|
||||||
|
Indescribable oppression, which seemed to generate in some unfamiliar part of her consciousness, filled her whole being with a vague anguish. It was like a shadow, like a mist passing across her soul's summer day. It was strange and unfamiliar; it was a mood. She did not sit there inwardly upbraiding her husband, lamenting at Fate, which had directed her footsteps to the path which they had taken. She was just having a good cry all to herself. The mosquitoes made merry over her, biting her firm, round arms and nipping at her bare insteps.
|
||||||
|
She looked at her little girl who was about to become a teen. She tried to think back to when the girl had been younger but failed to pinpoint the exact moment when she had become a little too big to pick up and carry. It hit her all at once. She was no longer a little girl and she stood there speechless with fear, sadness, and pride all running through her at the same time.
|
||||||
|
The robot clicked disapprovingly, gurgled briefly inside its cubical interior and extruded a pony glass of brownish liquid. "Sir, you will undoubtedly end up in a drunkard's grave, dead of hepatic cirrhosis," it informed me virtuously as it returned my ID card. I glared as I pushed the glass across the table.
|
||||||
|
The leather jacked showed the scars of being his favorite for years. It wore those scars with pride, feeling that they enhanced his presence rather than diminishing it. The scars gave it character and had not overwhelmed to the point that it had become ratty. The jacket was in its prime and it knew it.
|
||||||
|
It's always good to bring a slower friend with you on a hike. If you happen to come across bears, the whole group doesn't have to worry. Only the slowest in the group do. That was the lesson they were about to learn that day.
|
||||||
|
It was a rat's nest. Not a literal one, but that is what her hair seemed to resemble every morning when she got up. It was going to take at least an hour to get it under control and she was sick and tired of it. She peered into the mirror and wondered if it was worth it. It wasn't. She opened the drawer and picked up the hair clippers.
|
||||||
|
He was an expert but not in a discipline that anyone could fully appreciate. He knew how to hold the cone just right so that the soft server ice-cream fell into it at the precise angle to form a perfect cone each and every time. It had taken years to perfect and he could now do it without even putting any thought behind it. Nobody seemed to fully understand the beauty of this accomplishment except for the new worker who watched in amazement.
|
||||||
|
Her eyebrows were a shade darker than her hair. They were thick and almost horizontal, emphasizing the depth of her eyes. She was rather handsome than beautiful. Her face was captivating by reason of a certain frankness of expression and a contradictory subtle play of features. Her manner was engaging.
|
||||||
|
It was difficult for him to admit he was wrong. He had been so certain that he was correct and the deeply held belief could never be shaken. Yet the proof that he had been incorrect stood right before his eyes. "See daddy, I told you that they are real!" his daughter excitedly proclaimed.
|
||||||
|
There was little doubt that the bridge was unsafe. All one had to do was look at it to know that with certainty. Yet Bob didn't see another option. He may have been able to work one out if he had a bit of time to think things through, but time was something he didn't have. A choice needed to be made, and it needed to be made quickly.
|
||||||
|
What have you noticed today? I noticed that if you outline the eyes, nose, and mouth on your face with your finger, you make an "I" which makes perfect sense, but is something I never noticed before. What have you noticed today?
|
||||||
|
There was a time when he would have embraced the change that was coming. In his youth, he sought adventure and the unknown, but that had been years ago. He wished he could go back and learn to find the excitement that came with change but it was useless. That curiosity had long left him to where he had come to loathe anything that put him out of his comfort zone.
|
||||||
|
She had been told time and time again that the most important steps were the first and the last. It was something that she carried within her in everything she did, but then he showed up and disrupted everything. He told her that she had it wrong. The first step wasn't the most important. The last step wasn't the most important. It was the next step that was the most important.
|
||||||
|
He walked down the steps from the train station in a bit of a hurry knowing the secrets in the briefcase must be secured as quickly as possible. Bounding down the steps, he heard something behind him and quickly turned in a panic. There was nobody there but a pair of old worn-out shoes were placed neatly on the steps he had just come down. Had he past them without seeing them? It didn't seem possible. He was about to turn and be on his way when a deep chill filled his body.
|
||||||
|
He took a sip of the drink. He wasn't sure whether he liked it or not, but at this moment it didn't matter. She had made it especially for him so he would have forced it down even if he had absolutely hated it. That's simply the way things worked. She made him a new-fangled drink each day and he took a sip of it and smiled, saying it was excellent.
|
||||||
|
Her mom had warned her. She had been warned time and again, but she had refused to believe her. She had done everything right and she knew she would be rewarded for doing so with the promotion. So when the promotion was given to her main rival, it not only stung, it threw her belief system into disarray. It was her first big lesson in life, but not the last.
|
||||||
|
Barbara had been waiting at the table for twenty minutes. it had been twenty long and excruciating minutes. David had promised that he would be on time today. He never was, but he had promised this one time. She had made him repeat the promise multiple times over the last week until she'd believed his promise. Now she was paying the price.
|
||||||
|
He had done everything right. There had been no mistakes throughout the entire process. It had been perfection and he knew it without a doubt, but the results still stared back at him with the fact that he had lost.
|
||||||
|
It was easy to spot her. All you needed to do was look at her socks. They were never a matching pair. One would be green while the other would be blue. One would reach her knee while the other barely touched her ankle. Every other part of her was perfect, but never the socks. They were her micro act of rebellion.
|
||||||
|
Hopes and dreams were dashed that day. It should have been expected, but it still came as a shock. The warning signs had been ignored in favor of the possibility, however remote, that it could actually happen. That possibility had grown from hope to an undeniable belief it must be destiny. That was until it wasn't and the hopes and dreams came crashing down.
|
||||||
|
Many people say that life isn't like a bed of roses. I beg to differ. I think that life is quite like a bed of roses. Just like life, a bed of roses looks pretty on the outside, but when you're in it, you find that it is nothing but thorns and pain. I myself have been pricked quite badly.
|
||||||
|
There was something in the tree. It was difficult to tell from the ground, but Rachael could see movement. She squinted her eyes and peered in the direction of the movement, trying to decipher exactly what she had spied. The more she peered, however, the more she thought it might be a figment of her imagination. Nothing seemed to move until the moment she began to take her eyes off the tree. Then in the corner of her eye, she would see the movement again and begin the process of staring again.
|
||||||
|
"Explain to me again why I shouldn't cheat?" he asked. "All the others do and nobody ever gets punished for doing so. I should go about being happy losing to cheaters because I know that I don't? That's what you're telling me?"
|
||||||
|
What have you noticed today? I noticed that if you outline the eyes, nose, and mouth on your face with your finger, you make an "I" which makes perfect sense, but is something I never noticed before. What have you noticed today?
|
||||||
|
I guess we could discuss the implications of the phrase "meant to be." That is if we wanted to drown ourselves in a sea of backwardly referential semantics and other mumbo-jumbo. Maybe such a discussion would result in the determination that "meant to be" is exactly as meaningless a phrase as it seems to be, and that none of us is actually meant to be doing anything at all. But that's my existential underpants underpinnings showing. It's the way the cookie crumbles. And now I want a cookie.
|
||||||
|
He took a sip of the drink. He wasn't sure whether he liked it or not, but at this moment it didn't matter. She had made it especially for him so he would have forced it down even if he had absolutely hated it. That's simply the way things worked. She made him a new-fangled drink each day and he took a sip of it and smiled, saying it was excellent.
|
||||||
|
Josh had spent year and year accumulating the information. He knew it inside out and if there was ever anyone looking for an expert in the field, Josh would be the one to call. The problem was that there was nobody interested in the information besides him and he knew it. Years of information painstakingly memorized and sorted with not a sole giving even an ounce of interest in the topic.
|
||||||
|
She looked at her student wondering if she could ever get through. "You need to learn to think for yourself," she wanted to tell him. "Your friends are holding you back and bringing you down." But she didn't because she knew his friends were all that he had and even if that meant a life of misery, he would never give them up.
|
||||||
|
He sat staring at the person in the train stopped at the station going in the opposite direction. She sat staring ahead, never noticing that she was being watched. Both trains began to move and he knew that in another timeline or in another universe, they had been happy together.
|
||||||
|
His parents continued to question him. He didn't know what to say to them since they refused to believe the truth. He explained again and again, and they dismissed his explanation as a figment of his imagination. There was no way that grandpa, who had been dead for five years, could have told him where the treasure had been hidden. Of course, it didn't help that grandpa was roaring with laughter in the chair next to him as he tried to explain once again how he'd found it.
|
||||||
|
He sat across from her trying to imagine it was the first time. It wasn't. Had it been a hundred? It quite possibly could have been. Two hundred? Probably not. His mind wandered until he caught himself and again tried to imagine it was the first time.
|
||||||
|
It was easy to spot her. All you needed to do was look at her socks. They were never a matching pair. One would be green while the other would be blue. One would reach her knee while the other barely touched her ankle. Every other part of her was perfect, but never the socks. They were her micro act of rebellion.
|
||||||
|
The young man wanted a role model. He looked long and hard in his youth, but that role model never materialized. His only choice was to embrace all the people in his life he didn't want to be like.
|
||||||
|
She had been told time and time again that the most important steps were the first and the last. It was something that she carried within her in everything she did, but then he showed up and disrupted everything. He told her that she had it wrong. The first step wasn't the most important. The last step wasn't the most important. It was the next step that was the most important.
|
||||||
|
This is important to remember. Love isn't like pie. You don't need to divide it among all your friends and loved ones. No matter how much love you give, you can always give more. It doesn't run out, so don't try to hold back giving it as if it may one day run out. Give it freely and as much as you want.
|
||||||
|
She had come to the conclusion that you could tell a lot about a person by their ears. The way they stuck out and the size of the earlobes could give you wonderful insights into the person. Of course, she couldn't scientifically prove any of this, but that didn't matter to her. Before anything else, she would size up the ears of the person she was talking to.
|
||||||
|
As she sat watching the world go by, something caught her eye. It wasn't so much its color or shape, but the way it was moving. She squinted to see if she could better understand what it was and where it was going, but it didn't help. As she continued to stare into the distance, she didn't understand why this uneasiness was building inside her body. She felt like she should get up and run. If only she could make out what it was. At that moment, she comprehended what it was and where it was heading, and she knew her life would never be the same.
|
||||||
|
Dave wasn't exactly sure how he had ended up in this predicament. He ran through all the events that had lead to this current situation and it still didn't make sense. He wanted to spend some time to try and make sense of it all, but he had higher priorities at the moment. The first was how to get out of his current situation of being naked in a tree with snow falling all around and no way for him to get down.
|
||||||
|
"What is the best way to get what you want?" she asked. He looked down at the ground knowing that she wouldn't like his answer. He hesitated, knowing that the truth would only hurt. How was he going to tell her that the best way for him to get what he wanted was to leave her?
|
||||||
|
The chair sat in the corner where it had been for over 25 years. The only difference was there was someone actually sitting in it. How long had it been since someone had done that? Ten years or more he imagined. Yet there was no denying the presence in the chair now.
|
||||||
|
I haven't bailed on writing. Look, I'm generating a random paragraph at this very moment in an attempt to get my writing back on track. I am making an effort. I will start writing consistently again!
|
||||||
|
Since they are still preserved in the rocks for us to see, they must have been formed quite recently, that is, geologically speaking. What can explain these striations and their common orientation? Did you ever hear about the Great Ice Age or the Pleistocene Epoch? Less than one million years ago, in fact, some 12,000 years ago, an ice sheet many thousands of feet thick rode over Burke Mountain in a southeastward direction. The many boulders frozen to the underside of the ice sheet tended to scratch the rocks over which they rode. The scratches or striations seen in the park rocks were caused by these attached boulders. The ice sheet also plucked and rounded Burke Mountain into the shape it possesses today.
|
||||||
|
He looked at the sand. Picking up a handful, he wondered how many grains were in his hand. Hundreds of thousands? "Not enough," the said under his breath. I need more.
|
||||||
|
The wolves stopped in their tracks, sizing up the mother and her cubs. It had been over a week since their last meal and they were getting desperate. The cubs would make a good meal, but there were high risks taking on the mother Grizzly. A decision had to be made and the wrong choice could signal the end of the pack.
|
||||||
|
She didn't like the food. She never did. She made the usual complaints and started the tantrum he knew was coming. But this time was different. Instead of trying to placate her and her unreasonable demands, he just stared at her and watched her meltdown without saying a word.
|
||||||
|
She reached her goal, exhausted. Even more chilling to her was that the euphoria that she thought she'd feel upon reaching it wasn't there. Something wasn't right. Was this the only feeling she'd have for over five years of hard work?
|
||||||
|
"Are you getting my texts???" she texted to him. He glanced at it and chuckled under his breath. Of course he was getting them, but if he wasn't getting them, how would he ever be able to answer? He put the phone down and continued on his project. He was ignoring her texts and he planned to continue to do so.
|
||||||
|
He knew what he was supposed to do. That had been apparent from the beginning. That was what made the choice so difficult. What he was supposed to do and what he would do were not the same. This would have been fine if he were willing to face the inevitable consequences, but he wasn't.
|
||||||
|
He had three simple rules by which he lived. The first was to never eat blue food. There was nothing in nature that was edible that was blue. People often asked about blueberries, but everyone knows those are actually purple. He understood it was one of the stranger rules to live by, but it had served him well thus far in the 50+ years of his life.
|
||||||
|
I'm heading back to Colorado tomorrow after being down in Santa Barbara over the weekend for the festival there. I will be making October plans once there and will try to arrange so I'm back here for the birthday if possible. I'll let you know as soon as I know the doctor's appointment schedule and my flight plans.
|
||||||
|
The rain and wind abruptly stopped, but the sky still had the gray swirls of storms in the distance. Dave knew this feeling all too well. The calm before the storm. He only had a limited amount of time before all Hell broke loose, but he stopped to admire the calmness. Maybe it would be different this time, he thought, with the knowledge deep within that it wouldn't.
|
||||||
|
Cake or pie? I can tell a lot about you by which one you pick. It may seem silly, but cake people and pie people are really different. I know which one I hope you are, but that's not for me to decide. So, what is it? Cake or pie?
|
||||||
|
Her mom had warned her. She had been warned time and again, but she had refused to believe her. She had done everything right and she knew she would be rewarded for doing so with the promotion. So when the promotion was given to her main rival, it not only stung, it threw her belief system into disarray. It was her first big lesson in life, but not the last.
|
||||||
|
It's not his fault. I know you're going to want to, but you can't blame him. He really has no idea how it happened. I kept trying to come up with excuses I could say to mom that would keep her calm when she found out what happened, but the more I tried, the more I could see none of them would work. He was going to get her wrath and there was nothing I could say to prevent it.
|
||||||
|
She tried to explain that love wasn't like pie. There wasn't a set number of slices to be given out. There wasn't less to be given to one person if you wanted to give more to another. That after a set amount was given out it would all disappear. She tried to explain this, but it fell on deaf ears.
|
||||||
|
I'm meant to be writing at this moment. What I mean is, I'm meant to be writing something else at this moment. The document I'm meant to be writing is, of course, open in another program on my computer and is patiently awaiting my attention. Yet here I am plonking down senseless sentiments in this paragraph because it's easier to do than to work on anything particularly meaningful. I am grateful for the distraction.
|
||||||
|
There were little things that she simply could not stand. The sound of someone tapping their nails on the table. A person chewing with their mouth open. Another human imposing themselves into her space. She couldn't stand any of these things, but none of them compared to the number one thing she couldn't stand which topped all of them combined.
|
||||||
|
It was going to rain. The weather forecast didn't say that, but the steel plate in his hip did. He had learned over the years to trust his hip over the weatherman. It was going to rain, so he better get outside and prepare.
|
||||||
|
It was difficult for him to admit he was wrong. He had been so certain that he was correct and the deeply held belief could never be shaken. Yet the proof that he had been incorrect stood right before his eyes. "See daddy, I told you that they are real!" his daughter excitedly proclaimed.
|
||||||
|
He couldn't move. His head throbbed and spun. He couldn't decide if it was the flu or the drinking last night. It was probably a combination of both.
|
||||||
|
Sleeping in his car was never the plan but sometimes things don't work out as planned. This had been his life for the last three months and he was just beginning to get used to it. He didn't actually enjoy it, but he had accepted it and come to terms with it. Or at least he thought he had. All that changed when he put the key into the ignition, turned it and the engine didn't make a sound.
|
||||||
|
Colors bounced around in her head. They mixed and threaded themselves together. Even colors that had no business being together. They were all one, yet distinctly separate at the same time. How was she going to explain this to the others?
|
||||||
|
There was little doubt that the bridge was unsafe. All one had to do was look at it to know that with certainty. Yet Bob didn't see another option. He may have been able to work one out if he had a bit of time to think things through, but time was something he didn't have. A choice needed to be made, and it needed to be made quickly.
|
||||||
|
It was that terrifying feeling you have as you tightly hold the covers over you with the knowledge that there is something hiding under your bed. You want to look, but you don't at the same time. You're frozen with fear and unable to act. That's where she found herself and she didn't know what to do next
|
||||||
|
She patiently waited for his number to be called. She had no desire to be there, but her mom had insisted that she go. She's resisted at first, but over time she realized it was simply easier to appease her and go. Mom tended to be that way. She would keep insisting until you wore down and did what she wanted. So, here she sat, patiently waiting for her number to be called.
|
||||||
|
He was aware there were numerous wonders of this world including the unexplained creations of humankind that showed the wonder of our ingenuity. There are huge heads on Easter Island. There are the Egyptian pyramids. There’s Stonehenge. But he now stood in front of a newly discovered monument that simply didn't make any sense and he wondered how he was ever going to be able to explain it.
|
||||||
|
What was beyond the bend in the stream was unknown. Both were curious, but only one was brave enough to want to explore. That was the problem. There was always one that let fear rule her life.
|
||||||
|
"It was so great to hear from you today and it was such weird timing," he said. "This is going to sound funny and a little strange, but you were in a dream I had just a couple of days ago. I'd love to get together and tell you about it if you're up for a cup of coffee," he continued, laying the trap he'd been planning for years.
|
||||||
|
Turning away from the ledge, he started slowly down the mountain, deciding that he would, that very night, satisfy his curiosity about the man-house. In the meantime, he would go down into the canyon and get a cool drink, after which he would visit some berry patches just over the ridge, and explore among the foothills a bit before his nap-time, which always came just after the sun had walked past the middle of the sky. At that period of the day the sun’s warm rays seemed to cast a sleepy spell over the silent mountainside, so all of the animals, with one accord, had decided it should be the hour for their mid-day sleep.
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@ -27,19 +27,12 @@ public final class BrotliOptions implements CompressionOptions {
|
|||||||
private final Encoder.Parameters parameters;
|
private final Encoder.Parameters parameters;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation of {@link BrotliOptions} with{@link Encoder.Parameters#setQuality(int)} set to 4
|
* @see StandardCompressionOptions#brotli()
|
||||||
* and {@link Encoder.Parameters#setMode(Encoder.Mode)} set to {@link Encoder.Mode#TEXT}
|
|
||||||
*/
|
*/
|
||||||
static final BrotliOptions DEFAULT = new BrotliOptions(
|
static final BrotliOptions DEFAULT = new BrotliOptions(
|
||||||
new Encoder.Parameters().setQuality(4).setMode(Encoder.Mode.TEXT)
|
new Encoder.Parameters().setQuality(4).setMode(Encoder.Mode.TEXT)
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new {@link BrotliOptions}
|
|
||||||
*
|
|
||||||
* @param parameters {@link Encoder.Parameters} Instance
|
|
||||||
* @throws NullPointerException If {@link Encoder.Parameters} is {@code null}
|
|
||||||
*/
|
|
||||||
BrotliOptions(Encoder.Parameters parameters) {
|
BrotliOptions(Encoder.Parameters parameters) {
|
||||||
this.parameters = ObjectUtil.checkNotNull(parameters, "Parameters");
|
this.parameters = ObjectUtil.checkNotNull(parameters, "Parameters");
|
||||||
|
|
||||||
|
@ -28,30 +28,14 @@ public class DeflateOptions implements CompressionOptions {
|
|||||||
private final int memLevel;
|
private final int memLevel;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation of {@link DeflateOptions} with
|
* @see StandardCompressionOptions#deflate()
|
||||||
* {@link #compressionLevel} set to 6, {@link #windowBits} set to 15
|
|
||||||
* and {@link #memLevel} set to 8.
|
|
||||||
*/
|
*/
|
||||||
static final DeflateOptions DEFAULT = new DeflateOptions(
|
static final DeflateOptions DEFAULT = new DeflateOptions(
|
||||||
6, 15, 8
|
6, 15, 8
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new {@link DeflateOptions} Instance
|
* @see StandardCompressionOptions#deflate(int, int, int)
|
||||||
*
|
|
||||||
* @param compressionLevel {@code 1} yields the fastest compression and {@code 9} yields the
|
|
||||||
* best compression. {@code 0} means no compression. The default
|
|
||||||
* compression level is {@code 6}.
|
|
||||||
*
|
|
||||||
* @param windowBits The base two logarithm of the size of the history buffer. The
|
|
||||||
* value should be in the range {@code 9} to {@code 15} inclusive.
|
|
||||||
* Larger values result in better compression at the expense of
|
|
||||||
* memory usage. The default value is {@code 15}.
|
|
||||||
*
|
|
||||||
* @param memLevel How much memory should be allocated for the internal compression
|
|
||||||
* state. {@code 1} uses minimum memory and {@code 9} uses maximum
|
|
||||||
* memory. Larger values result in better and faster compression
|
|
||||||
* at the expense of memory usage. The default value is {@code 8}
|
|
||||||
*/
|
*/
|
||||||
DeflateOptions(int compressionLevel, int windowBits, int memLevel) {
|
DeflateOptions(int compressionLevel, int windowBits, int memLevel) {
|
||||||
this.compressionLevel = ObjectUtil.checkInRange(compressionLevel, 0, 9, "compressionLevel");
|
this.compressionLevel = ObjectUtil.checkInRange(compressionLevel, 0, 9, "compressionLevel");
|
||||||
|
@ -23,30 +23,14 @@ package io.netty.handler.codec.compression;
|
|||||||
public final class GzipOptions extends DeflateOptions {
|
public final class GzipOptions extends DeflateOptions {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default implementation of {@link GzipOptions} with
|
* @see StandardCompressionOptions#gzip()
|
||||||
* {@link #compressionLevel()} set to 6, {@link #windowBits()} set to 15
|
|
||||||
* and {@link #memLevel()} set to 8.
|
|
||||||
*/
|
*/
|
||||||
static final GzipOptions DEFAULT = new GzipOptions(
|
static final GzipOptions DEFAULT = new GzipOptions(
|
||||||
6, 15, 8
|
6, 15, 8
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new {@link GzipOptions} Instance
|
* @see StandardCompressionOptions#gzip(int, int, int)
|
||||||
*
|
|
||||||
* @param compressionLevel {@code 1} yields the fastest compression and {@code 9} yields the
|
|
||||||
* best compression. {@code 0} means no compression. The default
|
|
||||||
* compression level is {@code 6}.
|
|
||||||
*
|
|
||||||
* @param windowBits The base two logarithm of the size of the history buffer. The
|
|
||||||
* value should be in the range {@code 9} to {@code 15} inclusive.
|
|
||||||
* Larger values result in better compression at the expense of
|
|
||||||
* memory usage. The default value is {@code 15}.
|
|
||||||
*
|
|
||||||
* @param memLevel How much memory should be allocated for the internal compression
|
|
||||||
* state. {@code 1} uses minimum memory and {@code 9} uses maximum
|
|
||||||
* memory. Larger values result in better and faster compression
|
|
||||||
* at the expense of memory usage. The default value is {@code 8}
|
|
||||||
*/
|
*/
|
||||||
GzipOptions(int compressionLevel, int windowBits, int memLevel) {
|
GzipOptions(int compressionLevel, int windowBits, int memLevel) {
|
||||||
super(compressionLevel, windowBits, memLevel);
|
super(compressionLevel, windowBits, memLevel);
|
||||||
|
@ -28,14 +28,18 @@ public final class StandardCompressionOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see BrotliOptions#DEFAULT
|
* Default implementation of {@link BrotliOptions} with {@link Encoder.Parameters#setQuality(int)} set to 4
|
||||||
|
* and {@link Encoder.Parameters#setMode(Encoder.Mode)} set to {@link Encoder.Mode#TEXT}
|
||||||
*/
|
*/
|
||||||
public static BrotliOptions brotli() {
|
public static BrotliOptions brotli() {
|
||||||
return BrotliOptions.DEFAULT;
|
return BrotliOptions.DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see BrotliOptions#BrotliOptions(Encoder.Parameters)
|
* Create a new {@link BrotliOptions}
|
||||||
|
*
|
||||||
|
* @param parameters {@link Encoder.Parameters} Instance
|
||||||
|
* @throws NullPointerException If {@link Encoder.Parameters} is {@code null}
|
||||||
*/
|
*/
|
||||||
public static BrotliOptions brotli(Encoder.Parameters parameters) {
|
public static BrotliOptions brotli(Encoder.Parameters parameters) {
|
||||||
return new BrotliOptions(parameters);
|
return new BrotliOptions(parameters);
|
||||||
@ -64,29 +68,59 @@ public final class StandardCompressionOptions {
|
|||||||
return new ZstdOptions(compressionLevel, blockSize, maxEncodeSize);
|
return new ZstdOptions(compressionLevel, blockSize, maxEncodeSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see GzipOptions#DEFAULT
|
* Default implementation of {@link GzipOptions} with
|
||||||
|
* {@code compressionLevel()} set to 6, {@code windowBits()} set to 15 and {@code memLevel()} set to 8.
|
||||||
*/
|
*/
|
||||||
public static GzipOptions gzip() {
|
public static GzipOptions gzip() {
|
||||||
return GzipOptions.DEFAULT;
|
return GzipOptions.DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see GzipOptions#GzipOptions(int, int, int)
|
* Create a new {@link GzipOptions} Instance
|
||||||
|
*
|
||||||
|
* @param compressionLevel {@code 1} yields the fastest compression and {@code 9} yields the
|
||||||
|
* best compression. {@code 0} means no compression. The default
|
||||||
|
* compression level is {@code 6}.
|
||||||
|
*
|
||||||
|
* @param windowBits The base two logarithm of the size of the history buffer. The
|
||||||
|
* value should be in the range {@code 9} to {@code 15} inclusive.
|
||||||
|
* Larger values result in better compression at the expense of
|
||||||
|
* memory usage. The default value is {@code 15}.
|
||||||
|
*
|
||||||
|
* @param memLevel How much memory should be allocated for the internal compression
|
||||||
|
* state. {@code 1} uses minimum memory and {@code 9} uses maximum
|
||||||
|
* memory. Larger values result in better and faster compression
|
||||||
|
* at the expense of memory usage. The default value is {@code 8}
|
||||||
*/
|
*/
|
||||||
public static GzipOptions gzip(int compressionLevel, int windowBits, int memLevel) {
|
public static GzipOptions gzip(int compressionLevel, int windowBits, int memLevel) {
|
||||||
return new GzipOptions(compressionLevel, windowBits, memLevel);
|
return new GzipOptions(compressionLevel, windowBits, memLevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see DeflateOptions#DEFAULT
|
* Default implementation of {@link DeflateOptions} with
|
||||||
|
* {@code compressionLevel} set to 6, {@code windowBits} set to 15 and {@code memLevel} set to 8.
|
||||||
*/
|
*/
|
||||||
public static DeflateOptions deflate() {
|
public static DeflateOptions deflate() {
|
||||||
return DeflateOptions.DEFAULT;
|
return DeflateOptions.DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see DeflateOptions#DeflateOptions(int, int, int)
|
* Create a new {@link DeflateOptions} Instance
|
||||||
|
*
|
||||||
|
* @param compressionLevel {@code 1} yields the fastest compression and {@code 9} yields the
|
||||||
|
* best compression. {@code 0} means no compression. The default
|
||||||
|
* compression level is {@code 6}.
|
||||||
|
*
|
||||||
|
* @param windowBits The base two logarithm of the size of the history buffer. The
|
||||||
|
* value should be in the range {@code 9} to {@code 15} inclusive.
|
||||||
|
* Larger values result in better compression at the expense of
|
||||||
|
* memory usage. The default value is {@code 15}.
|
||||||
|
*
|
||||||
|
* @param memLevel How much memory should be allocated for the internal compression
|
||||||
|
* state. {@code 1} uses minimum memory and {@code 9} uses maximum
|
||||||
|
* memory. Larger values result in better and faster compression
|
||||||
|
* at the expense of memory usage. The default value is {@code 8}
|
||||||
*/
|
*/
|
||||||
public static DeflateOptions deflate(int compressionLevel, int windowBits, int memLevel) {
|
public static DeflateOptions deflate(int compressionLevel, int windowBits, int memLevel) {
|
||||||
return new DeflateOptions(compressionLevel, windowBits, memLevel);
|
return new DeflateOptions(compressionLevel, windowBits, memLevel);
|
||||||
|
@ -62,8 +62,7 @@ public class BrotliDecoderTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static boolean isNotSupported() {
|
static boolean isNotSupported() {
|
||||||
return (PlatformDependent.isOsx() || PlatformDependent.isWindows())
|
return PlatformDependent.isOsx() && "aarch_64".equals(PlatformDependent.normalizedArch());
|
||||||
&& "aarch_64".equals(PlatformDependent.normalizedArch());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void fillArrayWithCompressibleData(byte[] array) {
|
private static void fillArrayWithCompressibleData(byte[] array) {
|
||||||
|
@ -71,7 +71,6 @@ public class BrotliEncoderTest extends AbstractEncoderTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static boolean isNotSupported() {
|
static boolean isNotSupported() {
|
||||||
return (PlatformDependent.isOsx() || PlatformDependent.isWindows())
|
return PlatformDependent.isOsx() && "aarch_64".equals(PlatformDependent.normalizedArch());
|
||||||
&& "aarch_64".equals(PlatformDependent.normalizedArch());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user