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

Remove EncodedData replacing with Array<UInt8> #20

Merged
merged 10 commits into from
Apr 20, 2019
Merged

Conversation

tonystone
Copy link
Member

Description

Remove EncodedData and replace with Array<UInt8>

Motivation and Context

With the changes in the internal representation of EncodedData, it does not make sense to have an intermediate structure at this point. Removing EncodedData also creates an easier to understand interface as well as makes it simpler to add future binary formats if required.

How Has This Been Tested?

The existing tests cover the new changes and all tests pass.

Checklist:

For all changes:

  • Is there an issue associated with this PR? Is it referenced
    in the commit message?
  • Has your PR been rebased against the latest commit within the target branch (typically master)?
  • Is your initial contribution a single, squashed commit?

For code changes:

  • Avoid other runtime dependencies
  • Have you written or updated unit tests to verify your changes?
  • Have you ensured that the full suite of tests is executed via make tests in the cmake-build-debug` directory off the root of the project?
  • If applicable, have you updated the documentation?
  • If applicable, have you updated the CHANGELOG.md file?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@codecov
Copy link

codecov bot commented Apr 13, 2019

Codecov Report

Merging #20 into master will decrease coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #20      +/-   ##
==========================================
- Coverage   99.45%   99.41%   -0.04%     
==========================================
  Files          14       13       -1     
  Lines         918      857      -61     
==========================================
- Hits          913      852      -61     
  Misses          5        5
Impacted Files Coverage Δ
Sources/StickyEncoding/SingleValueContainer.swift 98.07% <100%> (+0.42%) ⬆️
Sources/StickyEncoding/BinaryEncoder.swift 100% <100%> (ø) ⬆️
.../StickyEncoding/StorageContainerReaderWriter.swift 100% <100%> (ø) ⬆️
Sources/StickyEncoding/BinaryDecoder.swift 98.76% <100%> (ø) ⬆️

- From `write(_ storageContainer: StorageContainer, to buffer: UnsafeMutableRawBufferPointer) -> Int` to `convert(_ storageContainer: StorageContainer) -> [UInt8]`.
- Remove byte count from element header.
- Adjust alignment decreasing padding.
@tonystone tonystone merged commit ba9ec3f into master Apr 20, 2019
@tonystone tonystone deleted the remove-encodeddata branch April 20, 2019 22:56
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.

1 participant