Skip to content

Convert all bitwise functions to use size sensitive right side arguments #81

@Tarig0

Description

@Tarig0

Example

>> 3 = Math.log(size)/ Math.log(2) = getLBBitShift()

&7 = size - 1

used for getting realworld chunks
>> 7 = getLBBitShift() + 4 = getLBChunkShift()

& 0X7F = {

short a = short.parse( String.format(String.format("%1$-" + getLBChunkShift()+ "s", "").replace(" ","1"))  ,2); //this creates a 1 filled string based on the little blocks size
ByteBuffer buffer = ByteBuffer.allocate(2);
buffer.putShort(a);
return buffer.get(1);

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions