<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <div class="moz-cite-prefix">On 22/09/2025 10:10 AM, H. Hirzel via
      Cuis-dev wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAGQxfViUe4U68vLWTn8_XJM4gaaO0nXBtYVWQEGw5usMja-+KQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>I could identify the change set which causes the problem,
          it is from last Wednesday<br>
        </div>
        <div><br>
        </div>
        <div>CoreUpdates\<a
href="http://7580-ReferenceStream-61BitSmallIntegers-fix-JuanVuletich-2025Sep17-08h16m-jmv.001.cs.st"
            moz-do-not-send="true">7580-ReferenceStream-61BitSmallIntegers-fix-JuanVuletich-2025Sep17-08h16m-jmv.001.cs.st</a></div>
        <div><br>
        </div>
        <div>It introduces a new version of #readInteger and
          writeInteger: in the class DataStream.</div>
        <div>If I undo the change of this change set it works.</div>
        <div><br>
        </div>
        <div>--Hannes<br>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
    <p>As you saw in that changeset (file name, comments in code, commit
      message), and as exemplified in the test added to BaseImageTests
      shortly after, what that code does is not to cause a problem, but
      to fix a serious bug that has been around for a long time and that
      is still present in Squeak. Just try to serialize an object with a
      largish SmallInteger and see what you get back.</p>
    <p>Anyway. I just pushed a better implementation that uses a
      different format for 32bit SmallIntegers than from larger ones.
      This brings back compatibility with the badly broken Squeak
      format, although it obviously can't bring back the bits that
      Squeak discarded when saving the file, and results will be wrong
      unless you're lucky enough to only use small SmallIntegers.</p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAGQxfViUe4U68vLWTn8_XJM4gaaO0nXBtYVWQEGw5usMja-+KQ@mail.gmail.com">
      <div dir="ltr">
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
        <div><br>
        </div>
      </div>
      <br>
      <div class="gmail_quote gmail_quote_container">
        <div dir="ltr" class="gmail_attr">On Mon, Sep 22, 2025 at
          2:36 PM H. Hirzel <<a href="mailto:hannes.hirzel@gmail.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">hannes.hirzel@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">
            <div>I am currently identifying which change set causes the
              problem.</div>
            <div>So far Cuis update 7523 still works.<br>
            </div>
            <div><br>
            </div>
            <div>This means if I produce a file '
              aDictWithByteArraysFromSq.obj' in Squeak I can read it in
              Cuis 7523</div>
            <div><br>
            </div>
            <div>So the problem has been introduced in one of the last
              60 updates.</div>
            <div><br>
            </div>
            <div><br>
            </div>
            <div class="gmail_quote">
              <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div dir="ltr">
                  <div>"Squeak"<br>
                    dict := Dictionary new.<br>
                    dict at: 1 put: #[1 2 3 4].<br>
                    dict at: 2 put: #[5 6 7 8].<br>
                    dict at: 3 put: #[10 20 30 40].<br>
                    <br>
                    fileStream := ReferenceStream fileNamed:
                    'aDictWithByteArraysFromSq.obj'.<br>
                    objectToSave := dict.<br>
                    fileStream nextPut: objectToSave.<br>
                    fileStream close</div>
                  <div><br>
                  </div>
                </div>
              </blockquote>
              <div> </div>
              <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                <div dir="ltr">
                  <div>"-----------------------------------------------"<br>
                  </div>
                  <div>"Restore in Cuis"<br>
                  </div>
                  <div>ReferenceStream restoreFromFile:
                    ('aDictWithByteArraysFromSq.obj' asFileEntry).<br>
                    <br>
                    "Result<br>
                    OK in Cuis 7523<br>
                    NOT OK in Cuis 7584"</div>
                  <div><br>
                  </div>
                </div>
              </blockquote>
            </div>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Juan Vuletich
<a class="moz-txt-link-abbreviated" href="http://www.cuis.st">www.cuis.st</a>
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich</pre>
  </body>
</html>