Skip to content

Code style #67

@kulvait

Description

@kulvait

Hi,

thank you for this library — I’m currently building an ImageJ plugin for Zarr on top of it.

While working on ReadOnlyZipStore, I focused on performance improvements. I rewrote the directory listing logic and avoided apache IO logic which provide a substantial speedup. However, chunk reading is still inefficient because it relies on sequential streaming via Apache Commons, so there is more room for improvement there.

On a separate note, I noticed that the repository does not seem to include an actual code style configuration (the .idea/codeStyles is empty). It would be very helpful to have a defined formatter. I experimented with Spotless + Eclipse formatter, but the result still introduces many formatting changes compared to the current codebase.

Before opening a PR, I’d like to avoid large formatting-only diffs. If you could share or export your code style, it would help keep contributions consistent.

Thanks!

Please have a look if it is possible to edit files in https://github.com/kulvait/zarr-java/tree/zip/styles so that it is possible to format by maven spotless like:

<plugin>
  <groupId>com.diffplug.spotless</groupId>
  <artifactId>spotless-maven-plugin</artifactId>
  <version>3.4.0</version>
  <configuration>
    <java>
      <eclipse>
        <file>${project.basedir}/styles/eclipseStyle.xml</file>
      </eclipse>
    </java>
    <formats>
      <format>
        <includes>
          <include>**/*.xml</include>
        </includes>
        <eclipseWtp>
          <type>XML</type>
          <files>
            <file>${project.basedir}/styles/org.eclipse.wst.xml.core.prefs</file>
          </files>
        </eclipseWtp>
      </format>
    </formats>
  </configuration>
  <executions>
    <execution>
      <goals>
        <goal>apply</goal>
      </goals>
    </execution>
  </executions>
</plugin>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions