Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor ChunkCompression to use BinaryReader and BinaryWriter #1162

Conversation

Argmaster
Copy link
Contributor

  • reading
  • writing

Related to: #1156

Copy link
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

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

Sorry, but I cannot review this. This PR is in a state where remaking your changes would be easier for me than reviewing them.
If you move around so much code and do changes to it, then I cannot see what you actually changed, making it impossible to review.

If you want to move code, then please either make it in a separate PR, or at least split it into two commits, one commit that just moves the code to the place you want it (and it doesn't even have to compile), and one commit to apply all the changes to it.

Also if you do want separate function for each compression algorithm, then the compress and decompress functions should be right next to each other in the code, to make it easier to edit them in pairs.

@Argmaster
Copy link
Contributor Author

Ok, I'll move them back into the switch and submit separate rearrangement PR after this one is merged

@Argmaster
Copy link
Contributor Author

I'm seeing double free error, but I have no idea where it happens :C

Double free detected. Allocation:
 First free:
 Second free:

@IntegratedQuantum
Copy link
Member

I'm seeing double free error, but I have no idea where it happens :C

Did you try running it in debug mode?

@Argmaster
Copy link
Contributor Author

Argmaster commented Mar 6, 2025

Yeah, well, I did it right now and there is no error :P
I'll try clean build just in case.

@IntegratedQuantum
Copy link
Member

Well if nothing works, you could always just use an external debugger

@Argmaster
Copy link
Contributor Author

So, I think I just compiled in dirty workspace after I merged master, after clean rebuild issue is gone.

Copy link
Member

@IntegratedQuantum IntegratedQuantum left a comment

Choose a reason for hiding this comment

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

looks good to me.

@IntegratedQuantum IntegratedQuantum merged commit 867e908 into PixelGuys:master Mar 7, 2025
1 check passed
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