This makes sense to me. Splitting a new DataOutputStream on bit order changes seems like the right way to solve this bug without too much of a fundamental design change.
I'll also add that that wiki page is awesome! Really helps to visualize the complexity of the buffering of output streams during unparsing. On 12/15/2017 08:29 AM, Mike Beckerle wrote: > I updated the wiki page, as I believe I understand the solution to the > problem. > > > So the page is turning into a general discussion of the unparser data output > stream collapse/morph algorithm. > > > The page URL I sent before won't work now, as I changed the page title. > > > Here's the new URL > > > https://cwiki.apache.org/confluence/display/DAFFODIL/Unparsing%3A+Data+Output+Stream+Buffering > > > > ________________________________ > From: Mike Beckerle > Sent: Thursday, December 14, 2017 3:38:47 PM > To: [email protected] > Subject: bug DAFFODIL-1843 - that has me blocked on my pull request > > > I have a pull request outstanding for a long time now. This is because of > this bug that I had to really analyze. > > > I believe this bug is in 2.0.0, and simply has a test now. > > > Here's a description of the bug. I did it on the wiki because I needed to > draw pictures. > > > https://cwiki.apache.org/confluence/display/DAFFODIL/A+Subtle+Bit-Order+Problem+for+Unparsing > > > I'd appreciate thought and suggestions on how to fix this issue. There are a > couple of possible ideas at the bottom of the page, but I'm not yet sure they > work. > > > Once we have a fix figured out, I plan to morph this wiki page into a > description of how the unparser works with its stream-splitting technique. > > >
