okio
                                
                                
                                
                                    okio copied to clipboard
                            
                            
                            
                        Switch to short for Segment’s `pos` and `limit` ?
These values are guaranteed in [0..8192] so an int is overkill. Switching these two values to short shrinks Segment’s memory footprint from 40 to 32 bytes, according to JOL.
Are there adverse consequences to using shorts? These two fields are very busy in the inner-loop.