Skip to content

Replace Size with ByteSize#482

Merged
JakeWharton merged 1 commit intoJakeWharton:trunkfrom
Goooler:replace-size
Mar 16, 2026
Merged

Replace Size with ByteSize#482
JakeWharton merged 1 commit intoJakeWharton:trunkfrom
Goooler:replace-size

Conversation

@Goooler
Copy link
Contributor

@Goooler Goooler commented Mar 16, 2026

No description provided.

Comment on lines +27 to +28
assertThat(entry.compressedSize).isEqualTo(7.binaryBytes)
assertThat(entry.uncompressedSize).isEqualTo(5.binaryBytes)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent

Comment on lines +6 to +7
val BinaryByteSize.absoluteValue: BinaryByteSize
get() = BinaryByteSize(inWholeBytes.absoluteValue)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only used in one place. We can inline it.

Copy link
Contributor Author

@Goooler Goooler Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sending a PR to add this for BinaryByteSize, so we can todo and remove it later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

val ZERO = Size(0)
}
}
operator fun BinaryByteSize.unaryMinus() = BinaryByteSize(-inWholeBytes)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +103 to +104
public final fun component3-7zWN8Bo ()J
public final fun component4-7zWN8Bo ()J
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, will address that in a follow-up.

@Goooler Goooler changed the title Replace Size with BinaryByteSize Replace Size with ByteSize Mar 16, 2026
@JakeWharton JakeWharton merged commit 8a3322c into JakeWharton:trunk Mar 16, 2026
1 check passed
@Goooler Goooler deleted the replace-size branch March 16, 2026 05:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants