commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COMPRESS-407) Validate Block and Record Sizes
Date Sun, 11 Jun 2017 22:54:18 GMT

    [ https://issues.apache.org/jira/browse/COMPRESS-407?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16046149#comment-16046149
] 

ASF GitHub Bot commented on COMPRESS-407:
-----------------------------------------

GitHub user sesuncedu opened a pull request:

    https://github.com/apache/commons-compress/pull/30

    COMPRESS-407 - Validate Block and Record Sizes and use 512 blocks if none given. 

    This PR includes the commits for COMPRESS-405 and COMPRESS-406.  
    The new content is  
    https://github.com/sesuncedu/commons-compress/commit/d754d8922a507da887aba70292aa650823a7a38c
if cherry-picking.
    
    The rest of the block size changes will be all be based on here, since they become less
 separable

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sesuncedu/commons-compress COMPRESS-407

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-compress/pull/30.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #30
    
----
commit 7f051c9cfe047289045618db3327fca018a25daf
Author: Simon Spero <sesuncedu@gmail.com>
Date:   2017-06-11T16:21:16Z

    COMPRESS-405 Create Fixed Length Block OutputStream / WriteableByteChannel
    
    This commit provides a new class that is an OutputStream and WritableByteChannel, and
which supports writing to a destination output stream or byte channel in fixed size blocks.
Internally, all writes are made using NIO.
    If the destination is a  FileOutputStream the existing channel is used.
    Other OutputStreams are wrapped with a custom channel implementation which does not attempt
to split writes into chunks.
    
    If the target channel fails to write the entire buffer in a single call, an exception
is thrown,
    
    Incoming data is accumulated in a ByteBuffer until a complete block is ready, then written
to the target.
    If  WritableByteChannel::write(ByteBuffer)  method is called, the code will attempt to
avoid copying data into the buffer if the buffer is empty, and a complete block is available.
    
    The class and UnitTest are in compress/utils . This is a MINOR change - thus the version
number for the package should be increated to 1.15.0.
    
    Signed-off-by: Simon Spero <sesuncedu@gmail.com>

commit 85a22f05b934cf82ddf271d4d800a001738b55d5
Author: Simon Spero <sesuncedu@gmail.com>
Date:   2017-06-11T16:29:04Z

    Added License Headers for the rat
    
    Signed-off-by: Simon Spero <sesuncedu@gmail.com>

commit d754d8922a507da887aba70292aa650823a7a38c
Author: Simon Spero <sesuncedu@gmail.com>
Date:   2017-06-11T22:48:42Z

    COMPRESS-407 Validate Block and Record Sizes
    
    Require block size >=0 that is multiple of 512 bytes.
    Use block size of 512 if one is not given.
    Require record size of 512 bytes. Deprecate constructors taking recordSize as parameter
    
    Modify tests to check for enforcement of record size == 512
    Modify tests to check for correct overall length  for
    different block sizes including PAX default, USTAR default, and unspecified.
    
    Signed-off-by: Simon Spero <sesuncedu@gmail.com>

----


> Validate Block and Record Sizes
> -------------------------------
>
>                 Key: COMPRESS-407
>                 URL: https://issues.apache.org/jira/browse/COMPRESS-407
>             Project: Commons Compress
>          Issue Type: Sub-task
>          Components: Archivers
>            Reporter: Simon Spero
>
> Reject record sizes not equal to 512 bytes; require block sizes to be multiples of 512
bytes.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message